The simplest way to get started with tldraw is to import theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tldraw/tldraw/llms.txt
Use this file to discover all available pages before exploring further.
Tldraw component and render it with the required CSS.
Basic implementation
BasicExample.tsx
What you get
With this minimal setup, you get:- Full infinite canvas with pan and zoom
- Complete drawing tools (select, draw, shapes, text, etc.)
- Default UI with toolbar and menus
- Undo/redo functionality
- Multi-selection and grouping
- Export capabilities
Required imports
The
tldraw/tldraw.css import is required for the editor to display correctly. Without it, the editor won’t render properly.Container styling
The editor should be placed inside a container with defined dimensions. Thetldraw__editor class provides sensible defaults:
onMount callback
You can access the editor instance using theonMount prop:
Next steps
- Learn about controlled editor
- Explore custom shapes
- Add persistence