Hiyve Components - v1.0.0
    Preparing search index...

    Interface AnnotationToolbarProps

    interface AnnotationToolbarProps {
        canClearAll: boolean;
        canDraw?: boolean;
        canSetDrawingLock?: boolean;
        colors?: Partial<AnnotationToolbarColors>;
        drawingLocked?: boolean;
        labels?: Partial<AnnotationToolbarLabels>;
        onClearAll: () => void;
        onClearMine: () => void;
        onSetDrawingLocked?: (locked: boolean) => void;
        onToolChange: (next: AnnotationTool | null) => void;
        palette?: readonly string[];
        renderRoot?: (children: ReactNode) => ReactNode;
        styles?: Partial<AnnotationToolbarStyles>;
        tool: AnnotationTool | null;
    }
    Index

    Properties

    canClearAll: boolean

    Whether the clear-all action is permitted for this caller.

    canDraw?: boolean

    When false, the drawing tools (pen toggle, colour swatches, width slider) are disabled / hidden — typically because the room owner has locked drawing for everyone else. Clear-mine stays enabled (the user can still wipe their existing strokes even if they can't add new ones). Defaults to true for back-compat. Wire to useAnnotationSync().canDraw.

    canSetDrawingLock?: boolean

    When false (or omitted) the lock toggle is hidden. Wire to useAnnotationSync().canSetDrawingLock.

    colors?: Partial<AnnotationToolbarColors>
    drawingLocked?: boolean

    Current drawing-lock state (synced across peers). When omitted the lock toggle is hidden — pass it through from useAnnotationSync().drawingLocked.

    labels?: Partial<AnnotationToolbarLabels>
    onClearAll: () => void

    Clear every stroke. Disabled visually when canClearAll is false.

    onClearMine: () => void

    Clear only this caller's strokes.

    onSetDrawingLocked?: (locked: boolean) => void

    Toggle the drawing lock. When provided alongside canSetDrawingLock, the toolbar renders a lock/unlock button. Wire to useAnnotationSync().setDrawingLocked.

    onToolChange: (next: AnnotationTool | null) => void

    Called when the user picks a different colour, width, or toggles draw-mode off (with null).

    palette?: readonly string[]

    Available palette. Defaults to a 6-colour high-contrast set.

    renderRoot?: (children: ReactNode) => ReactNode

    Optional render-prop wrapper for custom layout (e.g. moving the chip to a different corner). When omitted the toolbar renders itself in a flexbox row.

    styles?: Partial<AnnotationToolbarStyles>
    tool: AnnotationTool | null

    Active tool state, or null to indicate "draw mode off".