weasel API - v0.8.0
    Preparing search index...

    Interface ToolPresentation<TScratch>

    Presentation metadata for tool palettes / menus. Optional on every tool — consumers that render a palette (<ToolPalette>) read these fields to display the tool; consumers that don't can ignore them.

    Note: cursor is NOT here. The top-level Tool.cursor field below is already plumbed through <Canvas> to style.cursor on the host.

    interface ToolPresentation<TScratch = unknown> {
        group?: string;
        icon?: ReactNode | ((scratch?: TScratch) => ReactNode);
        label?: string;
        shortcut?: string;
    }

    Type Parameters

    • TScratch = unknown
    Index

    Properties

    group?: string

    Palette grouping key. Tools sharing a group render contiguously with separators between groups. Free-form string; the kit recommends 'select' | 'shape' | 'draw' | 'type' | 'view'.

    icon?: ReactNode | ((scratch?: TScratch) => ReactNode)

    Inline-SVG icon component output. May be a static ReactNode or a function of scratch state (rare; useful for shape-aware affordances).

    label?: string

    Human-readable label, distinct from the id. Falls back to id.

    shortcut?: string

    Display override for the keyboard shortcut. When omitted the palette derives one from Tool.keybinding via its own formatter.