Remove tool from UI
Using overrides, you can remove a tool from the toolbar, keyboard shortcuts, and other parts of the user interface. The tool will still be present in the application but not accessible to the user.
import { Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'
export default function RemoveToolExample() {
return (
<>
<div className="tldraw__editor">
<Tldraw
overrides={{
tools: (_editor, tools) => {
// Remove the text tool
delete tools.text
return tools
},
}}
/>
</div>
</>
)
}
Is this page helpful?
Prev
Custom rendererNext
Static assets