UIOptions
TheUIOptions prop allows you to customize which UI features and canvas actions are available in the Excalidraw editor.
Type Definition
Properties
number
The viewport width (in pixels) below which the sidebar switches from docked to floating mode.Allows you to control responsive behavior of the sidebar.
CanvasActions
Configuration object controlling which canvas actions are available.See Canvas Actions below for details.
object
Configuration for tool availability.
function
Optional function to control the editor form factor and desktop UI mode from the host app.If not provided, Excalidraw determines this automatically based on viewport size.
Canvas Actions
ThecanvasActions object controls which actions are available in the canvas menu and UI.
Action Properties
boolean
default:"true"
When
false, hides the canvas background color picker.boolean
default:"true"
When
false, hides the “Clear canvas” action.false | ExportOpts
default:"{ saveFileToDisk: true }"
Controls export functionality.
false: Disables all export featuresExportOpts: Configures export behavior (see Export Options)
boolean
default:"true"
When
false, hides the “Load scene” action (open file functionality).boolean
default:"true"
When
false, hides the “Save to active file” action.boolean | null
default:"null"
Controls the theme toggle button.
true: Shows the theme togglefalse: Hides the theme togglenull: Default behavior (shows based on context)
boolean
default:"true"
When
false, hides the “Save as image” action.Export Options
WhencanvasActions.export is an object, you can configure export behavior:
boolean
default:"true"
When
false, disables the ability to save exports directly to disk.function
Custom handler for backend export. Called when user exports the canvas.
function
Custom UI renderer for the export dialog.
Default Values
Excalidraw uses these default values whenUIOptions is not provided: