* feat(editor): inside-bind elbow arrows started inside enclosing shapes * fix(editor): keep orbiting elbow arrow start on its bound shape while dragging the end When a new elbow arrow's start switched from inside to orbit binding during an end drag, getElbowArrowData re-hit-tested the start's snapped point from the previous frame to find its shape. A neighbouring shape whose outline was closer to that point could win, so the start flickered between shapes in the preview, and on drop the arrow jumped to a different route bound to the original shape. Use the arrow's own startBinding element as the start's shape in this case, the same element the binding step uses on drop, so the preview and the dropped route agree. Routing stays stateless between frames. * fix(editor): don't inside-bind an orbiting elbow arrow end to a neighbouring shape An orbit-bound elbow arrow end sits in its shape's binding gap, which can also be inside a neighbouring shape that touches or overlaps the bound one. When the end was dragged, that neighbour was recorded as enclosing it, so dropping the end onto the neighbour inside-bound it at the drop point instead of orbiting the neighbour and snapping to its outline. For an orbit-bound end, only count a shape as enclosing if it also encloses the bound shape. An end orbiting a shape nested inside a container still inside-binds to that container when dropped within it. * fix(editor): snap a new elbow arrow's orbiting start to its outline when dropped with Ctrl When a new elbow arrow started inside a shape is dropped with its end outside that shape, the start switches from inside to orbit binding. The binding step on drop only snapped endpoints to the outline when binding was enabled, so dropping with Ctrl held and no pointer move outside the shape beforehand saved the start as an orbit binding whose fixed point was still inside the shape. Ctrl only disables binding for the dragged end, so always snap the start to the outline when it isn't the end being dragged. * refactor(editor): simplify elbow arrow inside-binding code - Compute the shapes enclosing a dragged elbow arrow endpoint in one helper, getElbowDragEnclosingIds, used both when creating an arrow and when dragging an endpoint. It applies the orbit-neighbour rule and returns null when no shape encloses the endpoint. - Add isPointInsideBindable for the "inside the shape and not clipped by its frame" check, and make isPointClippedByEnclosingFrame private again. - In getElbowArrowData, look up each bound shape once, and only build the element list when a hit-test needs it. - Check the cheap modifier and enclosure flags before the shape hit-test when deciding whether to bind inside. - Drop the shouldSnapToOutline argument from bindOrUnbindBindingElementEdge. With binding disabled, the only end that still binds is a new arrow's start switching to orbit, which must snap anyway. - Pass the binding strategy options straight through, and share the duplicated endOf test helper. No behaviour change. * fix(editor): only count shapes enclosing an elbow arrow's start shape for inside-binding The shapes recorded at the start of an elbow arrow creation or endpoint drag included every shape under the endpoint, also ones hidden behind the shape the gesture started in. Starting a new arrow where a filled shape covers part of another shape, then dragging the end into the visible part of the shape behind, inside-bound the end there instead of orbiting its outline. Apply the rule already used for orbiting ends to every case: only the shape the gesture starts in and the shapes enclosing it count. That is the endpoint's bound shape (the new arrow's start binding at creation), or for an unbound endpoint the shape the binding hit test picks there. * perf(editor): skip the start shape hit test when no shape encloses an elbow arrow endpoint getElbowDragEnclosingIds picked the gesture's start shape with a binding hit test over the whole scene before checking whether any shape encloses the endpoint. Look for enclosing shapes first and return early when there are none, so a gesture starting on empty canvas scans the scene once. --------- Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
Excalidraw Editor · Documentation · npm · Blog · Excalidraw+
An open source virtual whiteboard with a hand-drawn style, collaborative and end-to-end encrypted. Sketch diagrams, wireframes or whatever you like at excalidraw.com, or embed the editor in your own app with the @excalidraw/excalidraw React component.
Features
The Excalidraw editor (npm package) supports:
- 💯 Free and open source: MIT licensed.
- 🎨 Infinite canvas: zoom and pan without running out of room, with a minimap to find your way around.
- ✍️ Hand-drawn style: shapes, arrows and text that look sketched, with a choice of fonts, in light or dark mode.
- ⚒️ Wide range of tools: rectangle, diamond, ellipse, arrow, line, free-draw, text, sticky notes, frames, web embeds, laser pointer, eraser and more.
- ➡️ Arrows that follow your shapes: arrow binding, labeled arrows and elbow arrows.
- 🔀 Flowcharts from the keyboard: Ctrl/Cmd+arrow keys add the next node, Alt+arrow keys move between nodes.
- 🧜 Mermaid diagrams: paste a Mermaid definition and get shapes you can keep editing, with Mermaid to Excalidraw.
- 📊 Charts: paste spreadsheet data and get a bar, line or radar chart.
- 📷 Images and shape libraries: drop in images and crop them, and reuse shapes from public libraries or your own.
- 🔍 Command palette and search: run any action, or find text in the scene, from the keyboard.
- 🖼️ Export to PNG, SVG and clipboard: or save the drawing as an
.excalidrawJSON file, an open format. - 🌐 Localization (i18n): translated by the community.
- 🏗️ Customizable: props, an imperative API and UI you can extend when you embed it.
Excalidraw.com
The app hosted at excalidraw.com is a minimal showcase of what you can build with Excalidraw. Its source code is part of this repository as well, and the app features:
- 📡 PWA support: works offline.
- 🤼 Real-time collaboration: draw together in the same scene.
- 🔒 End-to-end encryption: the server can't read what you draw.
- 💾 Local-first: autosaves to the browser.
- 🔗 Shareable links: export to a read-only link you can share with others.
- ✨ Generative AI: text to diagram and wireframe to code.
We'll be adding these features as drop-in plugins for the npm package in the future.
Quick start
Note: the following instructions are for installing the Excalidraw npm package when integrating Excalidraw into your own app. To run the repository locally for development, please refer to our Development Guide.
npm install react react-dom @excalidraw/excalidraw
# or
yarn add react react-dom @excalidraw/excalidraw
To try unreleased changes, use @excalidraw/excalidraw@next.
import { Excalidraw } from "@excalidraw/excalidraw";
import "@excalidraw/excalidraw/index.css";
export default function App() {
return (
<div style={{ height: "100vh" }}>
<Excalidraw />
</div>
);
}
Excalidraw fills its parent, so the parent needs a height. See installation and integration for Next.js and other setups.
Excalidraw+
Excalidraw+ is the hosted workspace for teams, built on this editor. Using it also supports the open source project. On top of everything above, you get:
- ☁️ Unlimited scenes, saved to the cloud: organized in collections, with a dashboard to find them again.
- 👥 Team workspaces: access management, sharing with edit or view rights, read-only links and embeds.
- 💬 Comments, voice hangouts and screensharing: discuss a scene where you draw it.
- 🎞️ Presentations: turn frames into slides, present them live and export them to PDF or PPTX.
- ✨ More AI: 100 requests a day for text to diagram and wireframe to code, or bring your own key.
- 🤖 MCP server and REST API: let AI agents and scripts read and edit your scenes. See the MCP and API docs.
- 🔌 Integrations: bring your scenes into the tools your team already works in.
- 🏢 Enterprise ready: SSO (SAML or OIDC), admin controls for sharing and AI, and audit logs.
- 🔐 Security: two-factor authentication that admins can require of every member, encryption at rest and in transit, daily backups and SOC 2 Type 2. See security and compliance.
Try Excalidraw+ free for 14 days · Pricing
Excalidraw CLI
The Excalidraw CLI brings Excalidraw to your terminal, scripts and AI agents. It renders drawings and converts Mermaid diagrams on your computer, free and without an account:
npx @excalidraw/cli render drawing.excalidraw --out drawing.png
npx @excalidraw/cli mermaid flow.mmd --out flow.excalidraw
Log in to Excalidraw+ and it manages your workspace too: scenes, collections, share links and presentations. excalidraw mcp gives AI agents the Excalidraw+ drawing tools through the same login. See the CLI docs.
Documentation
📚 plus.excalidraw.com/docs/sdk
- Installation and integration
- API: props, methods and utilities
- Customizing styles
- FAQ
- Self-hosting the open source editor
- Development and the codebase
Contributing
- Missing something or found a bug? Report here.
- Want to contribute? Check out our contribution guide or let us know on Discord.
- Want to help with translations? See the translation guide.
Integrations
Who's integrating Excalidraw
Google Cloud • Meta • CodeSandbox • Obsidian Excalidraw • Replit • Slite • Notion • HackerRank • and many others
Sponsors & support
If you like the project, you can become a sponsor at Open Collective or use Excalidraw+.
Thank you for supporting Excalidraw
Last but not least, we're thankful to these companies for offering their services for free: