@mocanvas/mocanvas · interface
interface ToolbarItemPropsThe toolbar's buttons, one exported component per tool.
They are components rather than a data list so a caller can compose its own
bar out of exactly the tools it wants — <DrawToolbarItem />
<EraserToolbarItem /> — while each button keeps the behaviour that makes it
correct: it reads the tool from the UI tool list, so it disappears when the
tool is not registered, follows an override's relabelling, and shows itself
as pressed when its tool is the current one.
Properties · 3
icon?: stringOverride the item's own icon.
label?: stringOverride the item's own label.
tool: stringThe id of an entry in the UI tool list.
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.