Remove a tool from the toolbar

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
Add a tool to the toolbar
Next
Change default colors