tldraw-mods

Mods for tldraw offline

Custom shapes, tools, and UI for tldraw offline documents. Install any of them into a document with one command.

npx tldraw-mods init
npx tldraw-mods add landmark
How to use

You need the tldraw offline app and Node 20+. Mods are per document: each .tldraw file carries its own script, assembled in a workspace folder.

  1. Make a folder and save your document in it. mkdir my-canvas && cd my-canvas, then File → New in the app and File → Save into that folder.
  2. Set up the workspace, once per folder: npx tldraw-mods init. Writes the build and a src/ with the shell, and installs dependencies.
  3. Add mods with the document open: npx tldraw-mods add landmark. Downloads into src/mods/, bundles, loads into the open document, saves. The tool appears at the end of the toolbar.
  4. Later: list, remove browser, or apply after editing src/. The script is saved inside the .tldraw file, so the document keeps its mods wherever it is opened.

Document elsewhere? npx tldraw-mods add landmark --doc=/path/to/file.tldraw. Any shadcn GitHub registry works: npx tldraw-mods add owner/repo/item. Only install mods from people you trust; a document script runs with the app's permissions whenever the file is opened.