Custom page menu
You can customize tldraw's page menu, or remove it entirely.
The page menu can be customized by providing a PageMenu
component to the Tldraw
component's components
prop. If you provide null
, then that component will be hidden.
import { DefaultPageMenu, TLComponents, Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'
function CustomPageMenu() {
return (
<div style={{ transform: 'rotate(3.14rad)' }}>
<DefaultPageMenu />
</div>
)
}
const components: TLComponents = {
PageMenu: CustomPageMenu, // null will hide the page menu instead
}
export default function CustomPageMenuExample() {
return (
<div className="tldraw__editor">
<Tldraw components={components} />
</div>
)
}