Review finding 1. The skeleton placement pass in convertToExcalidrawElements() calls updateBoundElements(), which calls handleBindTextResize() for arrows with labels. When the label rewraps taller than getBoundTextMaxHeight() allows (for arrows under 80px tall, that is the label's old height), it set the arrow's `height` from the text, leaving it inconsistent with its points. Reproduction steps: convertToExcalidrawElements() with rectangles A (0,0,100x20) and B (500,0,100x20), an arrow at (100,10) with points [[0,0],[400,0]] bound from A to B with label "aaaa bbbb cccc dddd eeee fff", and a frame containing all three. Placement shortens the arrow, so the label wraps to 2 lines (height 25 -> 50). Failure case: observed arrow height 130 (50 + 80 padding) with points [[0,0],[388,0]]; expected 0, as the points are horizontal. The stale height persists through updateScene() and inflates later getBoundTextMaxHeight() results. The same happens in the editor: dragging the end point of a horizontal labelled arrow (linearElementEditor.test.tsx) left it at height 130. Fix: handleBindTextResize() no longer grows arrow containers to fit their label, matching redrawTextBoundingBox(), which already exempts arrows: an arrow's size derives from its points, and its label is positioned along them rather than within its height. The label itself still rewraps. The linearElementEditor inline snapshot that recorded the bogus height of 130 for a horizontal arrow is updated to 0.
Excalidraw Editor | Blog | Documentation | Excalidraw+
An open source virtual hand-drawn style whiteboard.
Collaborative and end-to-end encrypted.
Features
The Excalidraw editor (npm package) supports:
- 💯 Free & open-source.
- 🎨 Infinite, canvas-based whiteboard.
- ✍️ Hand-drawn like style.
- 🌓 Dark mode.
- 🏗️ Customizable.
- 📷 Image support.
- 😀 Shape libraries support.
- 🌐 Localization (i18n) support.
- 🖼️ Export to PNG, SVG & clipboard.
- 💾 Open format - export drawings as an
.excalidrawjson file. - ⚒️ Wide range of tools - rectangle, circle, diamond, arrow, line, free-draw, eraser...
- ➡️ Arrow-binding & labeled arrows.
- 🔙 Undo / Redo.
- 🔍 Zoom and panning support.
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.
- 🔒 End-to-end encryption.
- 💾 Local-first support (autosaves to the browser).
- 🔗 Shareable links (export to a readonly link you can share with others).
We'll be adding these features as drop-in plugins for the npm package in the future.
Quick start
Note: 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.
Use npm or yarn to install the package.
npm install react react-dom @excalidraw/excalidraw
# or
yarn add react react-dom @excalidraw/excalidraw
Check out our documentation for more details!
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: