Embedding a whiteboard in 50 lines of React
`import { Tldraw } from 'tldraw'; import 'tldraw/tldraw.css'; export default function App() { return <div style={{ width: '100vw', height: '100vh' }}><Tldraw /></div> }`. That gives you: freehand drawing, shapes, arrows, text, sticky notes, image embedding, infinite zoom, undo/redo, and export to PNG/SVG. The entire package is 200KB gzipped. For comparison, building this level of whiteboard UX from scratch with Canvas API would take months. tldraw gives it to you in 50 lines.
The SDK: custom tools and programmatic control
tldraw is not just a component, it is a headless canvas SDK. You can: create custom shape types with your own rendering, add custom tools to the toolbar, read/write the canvas state as JSON, sync state across users via your own backend, and embed the canvas inside a larger app with your own UI chrome. I built a custom 'Code Block' shape that renders syntax-highlighted code inside the canvas. This took 30 lines of code because tldraw's shape API is well-designed.
tldraw vs Excalidraw for developers
Excalidraw is a standalone app. tldraw is a React library. If you need a whiteboard that users open in a new tab, use Excalidraw. If you need a whiteboard embedded inside your own app, use tldraw. tldraw's SDK gives you programmatic access to every shape, tool, and binding. Excalidraw's library mode (reusable components) is better for non-developers. tldraw's custom shape system is better for developers building custom tools. They solve different problems.
The sync engine: real-time without Firebase
tldraw provides a sync engine demo that uses Cloudflare Workers + Durable Objects for real-time collaboration. You can swap this with your own backend (WebSocket, Supabase Realtime, PartyKit). The sync protocol is well-documented: it sends patches (not full snapshots) using CRDT-like operations. This means 10 users drawing simultaneously stays responsive and does not lose data. Building a real-time whiteboard sync engine from scratch is a PhD-level distributed systems problem. tldraw gives you the protocol for free.
The business model and why it matters
tldraw is open source (MIT license for the SDK, Apache 2.0 for the sync engine). They monetize through tldraw.com (a hosted whiteboard app) and enterprise licensing. This means the SDK is unlikely to disappear: it is the core of their business, not a side project. The community is active with 48K GitHub stars and 200+ contributors. For comparison, Excalidraw is also MIT licensed but has a single maintainer. tldraw has a company behind it.