@mocanvas/mocanvas · constant

TldrawUiToolbarItem

declare const TldrawUiToolbarItem: ({ tool: toolId, label, icon }: ToolbarItemProps) => react.JSX.Element | null

One toolbar button, driven by the tool list.

Named TldrawUiToolbarItem rather than ToolbarItem, which is already the name of the toolbar's *configuration* record in toolbar-config.

Renders nothing when the tool is not registered. That is the load-bearing behaviour: an editor built without the arrow tool simply has no arrow button, rather than one that throws when pressed.

Mentioned here

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.