Disable pages
Hide the page menu and page management UI with maxPages: 1.
import { Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'
export default function DisablePagesExample() {
return (
<div className="tldraw__editor">
<Tldraw persistenceKey="disable-pages" options={{ maxPages: 1 }} />
</div>
)
}
Set the maxPages editor option to 1 to remove the page menu from the top-left panel and the "move to page" item from the context menu. This is what most single-canvas apps want.
The document itself still contains one page record, so shapes and the store work exactly as before.
Is this page helpful?
Prev
Precise exact arrowsNext
Minimal