Projects
View on GitHub 
kolibril13/jupyter-tldraw
About
the very good free whiteboard tldraw in the jupyter output
Other ProjectsMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalJupyter 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
Explore related projects
Loading…