@mocanvas/mocanvas · interface

ToolbarItem

interface ToolbarItem

The default toolbar's contents, as data.

Kept apart from the components that render it so the tool *list* — which is also what TLUiOverrides.tools starts from and what useTools() hands to a custom toolbar — has no React in it.


Properties · 9

geo?: GeoShapeKind

Geo kind the entry selects, for entries driving the geo tool.

icon: IconName
id: string

Unique key; also the geo kind for geo entries.

kbd?: string

Keyboard shortcut(s), comma-separated. Lower case: these are compared against KeyboardEvent.key.

label: string
optional?: boolean

Tools outside the default set: shown only when the app registers them.

readonlyOk?: boolean

Keep the shortcut live on a read-only editor.

shortcut?: string

Displayed in the tooltip, next to the label.

tool: string

Tool id that must be registered for this entry to appear.

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.