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

    Main Whiteboard component props

    interface WhiteboardProps {
        canvasSx?: SxProps<Theme>;
        colors?: Partial<WhiteboardColors>;
        currentColor?: string;
        currentTool?: WhiteboardTool;
        currentWidth?: number;
        defaultColor?: string;
        defaultTool?: WhiteboardTool;
        defaultWidth?: number;
        enableAddins?: boolean;
        enableAutoSave?: boolean;
        enabledAddins?: string[];
        fileId: string;
        icons?: Partial<WhiteboardIcons>;
        initialFileData?: WhiteboardFile;
        isOwner?: boolean;
        labels?: Partial<WhiteboardLabels>;
        onCanvasCleared?: () => void;
        onClose?: () => void;
        onColorChange?: (color: string) => void;
        onError?: (error: Error) => void;
        onObjectAdded?: (object: WhiteboardObject) => void;
        onObjectModified?: (object: WhiteboardObject) => void;
        onObjectRemoved?: (objectId: string) => void;
        onReadOnlyChange?: (readOnly: boolean) => void;
        onSave?: (data: WhiteboardFile) => Promise<void>;
        onTitleChange?: (title: string) => void;
        onToolChange?: (tool: WhiteboardTool) => void;
        onUnsavedChangesChange?: (hasUnsavedChanges: boolean) => void;
        onWidthChange?: (width: number) => void;
        showGrid?: boolean;
        showToolbar?: boolean;
        showZoomControls?: boolean;
        styles?: Partial<WhiteboardStyles>;
        sx?: SxProps<Theme>;
        toolbarSx?: SxProps<Theme>;
    }
    Index

    Properties

    canvasSx?: SxProps<Theme>

    Additional MUI sx props for the canvas container

    colors?: Partial<WhiteboardColors>

    Custom colors for styling

    currentColor?: string

    Current drawing color (controlled mode)

    currentTool?: WhiteboardTool

    Current selected tool (controlled mode)

    currentWidth?: number

    Current stroke width (controlled mode)

    defaultColor?: string

    Default drawing color (uncontrolled mode)

    defaultTool?: WhiteboardTool

    Default tool (uncontrolled mode)

    defaultWidth?: number

    Default stroke width (uncontrolled mode)

    enableAddins?: boolean

    Enable add-in system (default: true)

    enableAutoSave?: boolean

    Enable auto-save (default: true)

    enabledAddins?: string[]

    Initial add-ins to enable

    fileId: string

    File ID of the whiteboard to load/edit

    icons?: Partial<WhiteboardIcons>

    Custom icons for UI elements

    initialFileData?: WhiteboardFile

    Initial file data for newly created whiteboards. When provided, the whiteboard will initialize with this data instead of fetching from the server. This is useful for newly created files that may not be immediately available.

    isOwner?: boolean

    Override ownership check. When true, always allows saving regardless of file owner field.

    labels?: Partial<WhiteboardLabels>

    Custom labels for UI elements

    onCanvasCleared?: () => void

    Called when canvas is cleared

    onClose?: () => void

    Called when the whiteboard should close

    onColorChange?: (color: string) => void

    Callback when color changes

    onError?: (error: Error) => void

    Called when an async operation fails (file load/save, sync, duplication, etc.)

    onObjectAdded?: (object: WhiteboardObject) => void

    Called when an object is added

    onObjectModified?: (object: WhiteboardObject) => void

    Called when an object is modified

    onObjectRemoved?: (objectId: string) => void

    Called when an object is removed

    onReadOnlyChange?: (readOnly: boolean) => void

    Called when read-only state changes

    onSave?: (data: WhiteboardFile) => Promise<void>

    Called when save is triggered

    onTitleChange?: (title: string) => void

    Called when the whiteboard title changes

    onToolChange?: (tool: WhiteboardTool) => void

    Callback when tool changes

    onUnsavedChangesChange?: (hasUnsavedChanges: boolean) => void

    Called when unsaved changes state changes

    onWidthChange?: (width: number) => void

    Callback when width changes

    showGrid?: boolean

    Show grid lines (default: false)

    showToolbar?: boolean

    Show the toolbar (default: true)

    showZoomControls?: boolean

    Show the zoom controls (default: true)

    styles?: Partial<WhiteboardStyles>

    Custom style configuration

    sx?: SxProps<Theme>

    Additional MUI sx props for the container

    toolbarSx?: SxProps<Theme>

    Additional MUI sx props for the toolbar