Jupyter Tldraw
A tldraw whiteboard as a Jupyter widget, built with anywidget.
Install & run
uv run --with jupyterlab --with tldraw jupyter lab
Examples
Three example notebooks are included:
| Notebook | Widget | What it shows |
|---|---|---|
basic.ipynb |
TldrawWidget |
A plain tldraw canvas embedded in a cell. |
monkey.ipynb |
MonkeyWidget |
A 🐒 emoji on the canvas; its x / y are synced as traitlets, so you can .observe(...) the position from Python. |
stroke.ipynb |
StrokeWidget |
Captures the currently-drawn freehand stroke as a [[x, y], ...] list in Python via the stroke traitlet. |
Minimal usage:
from tldraw import TldrawWidget
t = TldrawWidget()
t
Developer setup
- Clone the repo
npm iuv syncnpm run dev(esbuild watchesjs/*.jsxand rebuilds bundles intosrc/tldraw/static/)uv run jupyter lab
Hot module reload
Put this at the top of any dev notebook, before importing the widget:
%env ANYWIDGET_HMR=1
%load_ext autoreload
%autoreload 2
ANYWIDGET_HMR=1 makes anywidget watch the _esm / _css files; %autoreload 2 does the same on the Python side. Combined with npm run dev, edits to js/*.jsx swap into the running widget without re-running the cell.
anywidget reads
ANYWIDGET_HMRat import time — if you forgot to set it first, restart the kernel once.
In marimo
Metadata
Release files for tldraw 5.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tldraw-5.1.1.tar.gz | 1.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tldraw-5.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.6 MB
Release files / tldraw-5.1.1.tar.gz
| Download URL | tldraw-5.1.1.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d964142b8bca3b6aed2358338105bacb7e580509764998dee6e1ce5e000643e8
|
|
BLAKE2b-256 checksum How to use checksums |
c32446a9d455f49ea187e1acfbe186aa239a067125362de6a312be9ccc2d00a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / tldraw-5.1.1-py3-none-any.whl
| Download URL | tldraw-5.1.1-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87a6e20487e19afaac9840bddb10cb22cfc0c37b28b1a4d84b5d6f5ada91f444
|
|
BLAKE2b-256 checksum How to use checksums |
7152cc277ed9e873f6ceb6058705e898b614d3427d7e2c3bfbbcf6b0a9f3c9a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|