Overview
Excalidraw can be loaded directly in the browser using ES modules and a CDN. This approach is perfect for simple integrations, prototypes, or when you don’t want to use a build system.Quick Start
Here’s the simplest way to get Excalidraw running:index.html
Project Setup with Build Tool
For better performance and development experience, use a build tool like Vite:Advanced Example with Features
Here’s a comprehensive example showing various Excalidraw features:Using Initial Data
Load predefined elements when Excalidraw starts:initialData.tsx
Working with Images
Load and display images in your canvas:File Operations
Load and save Excalidraw files:TypeScript Setup
Createtsconfig.json for TypeScript support:
tsconfig.json
Production Build
CDN Alternatives
Instead ofesm.sh, you can use other CDNs: