Skip to main content

Overview

Excalidraw provides extensive customization options through props, allowing you to tailor the editor to your application’s needs. You can control UI elements, behavior, and visual appearance.

Theme Customization

Setting the Theme

Control the editor’s color scheme with the theme prop:
When you don’t pass the theme prop, Excalidraw automatically shows a theme toggle button in the canvas actions.

UI Options

Canvas Actions

Customize which action buttons appear on the canvas using UIOptions.canvasActions:
From the source code at packages/excalidraw/index.tsx:76-87, when toggleTheme is null and theme is undefined, the theme toggle button is automatically enabled.

Tools Configuration

Control which tools are available:

View Modes

View Mode

Disable editing and show the canvas in read-only mode:

Zen Mode

Hide UI elements for a distraction-free canvas:

Grid Mode

Show a grid overlay on the canvas:

Custom UI Components

Custom Top UI

Render custom components in the top left or right areas:

Custom Statistics

Add custom statistics to the stats dialog:

Behavior Configuration

Auto Focus

Automatically focus the canvas on mount:

Keyboard Handling

Control whether keyboard shortcuts work globally:
Be careful when enabling handleKeyboardGlobally as it may conflict with your application’s keyboard shortcuts.

Scroll Detection

Control scroll behavior detection:

Library Configuration

Library Return URL

Customize the URL users are redirected to after using the library:

AI Features

Enabling AI

Control AI-powered features:
AI features are enabled by default. From the source at packages/excalidraw/index.tsx:149, aiEnabled defaults to true unless explicitly set to false.

Advanced Customization

Custom Embeddable Validation

Control which embeddables are allowed:

Custom Scrollbars

Render custom scrollbars:

Next Steps

Theming

Learn about advanced theme customization

Export

Customize export functionality

Storage

Implement data persistence

Embedding

Embed Excalidraw in your app