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

    Interface WhiteboardToolbarProps

    Whiteboard toolbar component props

    interface WhiteboardToolbarProps {
        activeBackgroundPage?: number;
        addinButtons?: ToolbarButton[];
        backgroundFiles?: {
            fileId: string;
            fileName: string;
            resourceType: string;
        }[];
        backgroundPages?: WhiteboardBackgroundPage[];
        canRedo: boolean;
        canUndo: boolean;
        colors?: Partial<WhiteboardColors>;
        currentColor: string;
        currentTool: WhiteboardTool;
        currentWidth: number;
        hasSelection: boolean;
        hasUnsavedChanges?: boolean;
        icons?: Partial<WhiteboardIcons>;
        isSaving?: boolean;
        labels?: Partial<WhiteboardLabels>;
        onAddBackground?: (
            file: { fileId: string; fileName: string; resourceType: string },
        ) => void;
        onAddFilledShape?: (type: "circle" | "rect" | "triangle") => void;
        onAddOutlinedShape?: (type: "circle" | "rect" | "triangle") => void;
        onAddSymbol?: (symbol: WhiteboardSymbol) => void;
        onClear?: () => void;
        onClose?: () => void;
        onColorChange: (color: string) => void;
        onDelete: () => void;
        onGetFileUrl?: (file: { fileId: string }) => Promise<string | null>;
        onRedo: () => void;
        onRemoveBackground?: () => void;
        onSave?: () => void;
        onSetActiveBackground?: (index: number) => void;
        onShowAuditLog?: () => void;
        onToolChange: (tool: WhiteboardTool) => void;
        onUndo: () => void;
        onUploadBackground?: (file: File) => void | Promise<void>;
        onWidthChange: (width: number) => void;
        readOnly: boolean;
        styles?: Partial<WhiteboardStyles>;
        sx?: SxProps<Theme>;
        symbolLibrary?:
            | WhiteboardSymbolLibrary
            | (() => Promise<WhiteboardSymbolLibrary>);
    }
    Index

    Properties

    activeBackgroundPage?: number

    Active background page index

    addinButtons?: ToolbarButton[]

    Additional toolbar buttons from add-ins

    backgroundFiles?: { fileId: string; fileName: string; resourceType: string }[]

    Available files for background selection (images + PDFs)

    backgroundPages?: WhiteboardBackgroundPage[]

    Current background pages

    canRedo: boolean

    Whether redo is available

    canUndo: boolean

    Whether undo is available

    colors?: Partial<WhiteboardColors>
    currentColor: string

    Current drawing color

    currentTool: WhiteboardTool

    Currently selected tool

    currentWidth: number

    Current stroke width

    hasSelection: boolean

    Whether an object is selected

    hasUnsavedChanges?: boolean

    Whether there are unsaved changes (deprecated — save moved to EditableTitle)

    icons?: Partial<WhiteboardIcons>
    isSaving?: boolean

    Whether saving is in progress (deprecated — save moved to EditableTitle)

    labels?: Partial<WhiteboardLabels>
    onAddBackground?: (
        file: { fileId: string; fileName: string; resourceType: string },
    ) => void

    Called when user selects a file as background

    onAddFilledShape?: (type: "circle" | "rect" | "triangle") => void

    Called when add filled shape

    onAddOutlinedShape?: (type: "circle" | "rect" | "triangle") => void

    Called when add outlined shape

    onAddSymbol?: (symbol: WhiteboardSymbol) => void

    Called when the user clicks a symbol in the popup.

    onClear?: () => void

    Called when clear is triggered. Omit to hide the Clear button (e.g., non-owner peers).

    onClose?: () => void

    Called when close is triggered. If omitted, no close button is rendered.

    onColorChange: (color: string) => void

    Called when color changes

    onDelete: () => void

    Called when delete is triggered

    onGetFileUrl?: (file: { fileId: string }) => Promise<string | null>

    Resolve a presigned URL for a file entry. When provided, image files in the background-import list render a small thumbnail preview.

    onRedo: () => void

    Called when redo is triggered

    onRemoveBackground?: () => void

    Called when user removes all backgrounds

    onSave?: () => void

    Called when save is triggered (deprecated — save moved to EditableTitle)

    onSetActiveBackground?: (index: number) => void

    Called when user switches active background page

    onShowAuditLog?: () => void

    Open the audit-log panel. When omitted, the History toolbar button is hidden — typically passed only for the file owner so students don't get the action.

    onToolChange: (tool: WhiteboardTool) => void

    Called when tool is selected

    onUndo: () => void

    Called when undo is triggered

    onUploadBackground?: (file: File) => void | Promise<void>

    Upload a new file from disk (passes a File). When provided, an Upload button appears in the menu.

    onWidthChange: (width: number) => void

    Called when stroke width changes

    readOnly: boolean

    Whether the whiteboard is read-only

    styles?: Partial<WhiteboardStyles>
    sx?: SxProps<Theme>

    Additional MUI sx props

    symbolLibrary?:
        | WhiteboardSymbolLibrary
        | (() => Promise<WhiteboardSymbolLibrary>)

    Symbol library shown in the "Insert Symbol" popup. Either the library object directly, or an async loader called on first open of the popup. When omitted, the symbol button is hidden.