OptionalbackgroundAvailable files for background selection (images + PDFs from file manager)
OptionalcanvasAdditional MUI sx props for the canvas container
OptionalcolorsCustom colors for styling
OptionalcurrentCurrent drawing color (controlled mode)
OptionalcurrentCurrent selected tool (controlled mode)
OptionalcurrentCurrent stroke width (controlled mode)
OptionaldefaultDefault drawing color (uncontrolled mode)
OptionaldefaultDefault tool (uncontrolled mode)
OptionaldefaultDefault stroke width (uncontrolled mode)
OptionalenableEnable add-in system (default: true)
OptionalenableEnable auto-save (default: true)
OptionalenabledInitial add-ins to enable
File ID of the whiteboard to load/edit
OptionalfileThe file owner's userId. Together with sharedWith, used to filter
incoming broadcast messages. When omitted, sync filtering is disabled
(all messages accepted — legacy behavior).
OptionaliconsCustom icons for UI elements
OptionalinitialInitial 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.
OptionalisOverride ownership check. When true, always allows saving regardless of file owner field.
OptionallabelsCustom labels for UI elements
OptionallocalLocal user's display label sent on the presence channel so peers see a readable name. Falls back to userId-derivation when omitted.
OptionalonCalled whenever the persistent audit log changes (initial seed, append on local/remote action, snapshot replace). The consumer typically holds these in state and renders a WhiteboardAuditPanel in its own UI surface (e.g. a drawer or sidebar tab). Owner-only intent is enforced by the renderer — the SDK fires this for all participants who can read the log.
OptionalonCalled when canvas is cleared
OptionalonCalled when the whiteboard should close
OptionalonCallback when color changes
OptionalonCalled when an async operation fails (file load/save, sync, duplication, etc.)
OptionalonResolve a presigned URL for a file by its entry. Required for background import.
OptionalonCalled when an object is added
OptionalonCalled when an object is modified
OptionalonCalled when an object is removed
OptionalonOptional handler for an "Open existing" affordance rendered in the title bar (left of the title field). Useful when the editor was opened on a fresh blank file and the user wants a way back to a file picker. Omit to hide the button.
OptionalonCalled when read-only state changes
OptionalonCalled when save is triggered
OptionalonCalled with a small WebP preview of the current canvas contents after every successful save and once more when the whiteboard unmounts. Use this to persist a thumbnail (e.g. in an IndexedDB cache keyed by fileId) so library/file-browser cards can show a real snapshot instead of a generic placeholder.
The blob is generated from the logical canvas workspace (zoom/pan independent). Default size: longest edge 320px, quality 0.7.
OptionalonCalled after a symbol has been added to the canvas.
OptionalonCalled when the whiteboard title changes
OptionalonCallback when tool changes
OptionalonCalled when unsaved changes state changes
OptionalonUpload a new file (image or PDF) to the file system. After upload completes, the file is automatically added as a background. Required to enable the "Upload background" button in the toolbar.
OptionalonCallback when width changes
OptionalpeerOptional display labels for remote peers, keyed by their userId.
Consumed by the presence overlay to show readable names next to
each peer's cursor instead of falling back to a hashed id. Wire
this from the lesson roster (e.g. useParticipants()).
OptionalresolveResolve a userId to a display name for the audit panel and any
other surface that renders attribution. Called with the cleaned
userId and a sensible default; return the canonical display name
(e.g. nickname → real name → email) or undefined to fall through
to the default. Matches the convention used by VideoGrid, Chat,
and ParticipantList.
Wire this from useResolveDisplayName (or equivalent app-level
roster lookup) so the audit panel reads the same names a teacher
sees everywhere else in the app — including peer userIds the
lesson-room participant list doesn't carry (e.g. when the
whiteboard is opened outside a lesson context).
OptionalsharedUser IDs that have access to this file. Used to filter incoming broadcast
messages so only the owner and shared users receive real-time edits.
When empty or omitted, only the file owner's broadcasts are accepted
(owner-only default). When fileOwner is also omitted, filtering is
disabled entirely.
OptionalshowShow grid lines (default: false)
OptionalshowShow the toolbar (default: true)
OptionalshowShow the zoom controls (default: true)
OptionalstylesCustom style configuration
OptionalsxAdditional MUI sx props for the container
OptionalsymbolSymbol library — either a pre-loaded object or an async loader called the first time the user opens the symbols popup. When provided, a symbol button appears in the toolbar.
OptionaltoolbarAdditional MUI sx props for the toolbar
Main Whiteboard component props