@mocanvas/mocanvas · function

TldrawUiMenuActionItem

declare function TldrawUiMenuActionItem({ actionId, label, icon, disabled, noClose }: TLUiMenuActionItemProps): react.JSX.Element | null

A menu item driven by the action list.

Renders nothing when the action is not registered — the normal state on a trimmed or read-only editor. That is why the concrete items below are all written this way: removing an action through overrides.actions removes it from every menu at once, rather than leaving buttons that throw.

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.