Package Installation
1
Install via npm, yarn, or pnpm
Excalidraw requires React and React DOM as peer dependencies. Install the package using your preferred package manager:
React Version Support: Excalidraw supports React 17, 18, and 19. The package is compatible with
react@^17.0.2 || ^18.2.0 || ^19.0.0.2
Import Excalidraw and styles
Import the Excalidraw component and its required CSS file in your application:
3
Add the component to your app
Add Excalidraw to your component. Make sure the parent container has explicit dimensions:
Framework-Specific Setup
Next.js
Next.js requires dynamic imports with SSR disabled to avoid hydration issues.1
Create a wrapper component
Create a client component that imports Excalidraw:
excalidrawWrapper.tsx
2
Import with dynamic loading
In your page component, use Next.js dynamic imports with
ssr: false:- App Router
- Pages Router
app/page.tsx
Vite
Vite works out of the box with Excalidraw. Simply import and use:Create React App
Create React App also works without additional configuration:Self-Hosting Fonts
For production deployments, you should self-host Excalidraw fonts instead of loading them from a CDN.1
Copy font files to your public directory
Copy the fonts from
node_modules/@excalidraw/excalidraw/dist/prod/fonts to your public directory:The fonts directory includes all font families used by Excalidraw: Virgil (hand-drawn style), Cascadia, Assistant, and more.
2
Set the asset path
Configure In Next.js:In React:
window.EXCALIDRAW_ASSET_PATH to point to your public directory where fonts are hosted:In HTML:Browser Compatibility
Excalidraw supports modern browsers with the following minimum versions:Chrome / Edge
Version 70+
Firefox
Latest version
Safari
Version 12+
Mobile Browsers
Safari iOS 12+, Chrome Android
- Internet Explorer (any version)
- Opera Mini
- UC Browser < 13
- Samsung Internet < 10
- KaiOS ≤ 2.5
TypeScript Support
Excalidraw is written in TypeScript and includes full type definitions. No additional@types packages are needed.
Available Type Exports
Import types from the appropriate subpackages:Additional Packages
Excalidraw exports additional utility packages for advanced use cases:@excalidraw/common
@excalidraw/common
Common utilities and constants:
@excalidraw/element
@excalidraw/element
Element manipulation utilities:
@excalidraw/math
@excalidraw/math
Mathematical utilities for geometry calculations:
@excalidraw/utils
@excalidraw/utils
Export and utility functions:
Using the Latest (Unreleased) Version
To try unreleased features and bug fixes before the next stable release:Next Steps
Quick Start
Get drawing in 5 minutes with our quick start guide
API Reference
Explore all available props and methods
Examples
See real-world integration examples
Customization
Learn how to customize the UI and theme