Marimo Notebooks in Quartz — 3 Demos
All three notebooks below run entirely in your browser via WebAssembly (Pyodide). No Python server needed.
Method 1: molab iframe (hosted)
Uses marimo’s free cloud service. Click the slider, watch the plot update live.
First load downloads Pyodide (~15-30 MB). Be patient!
URL used:
https://marimo.app/github/marimo-team/gallery-examples/blob/main/notebooks/math/cellular-automaton-art.py/wasm?embed=true
Method 2: Self-hosted WASM (no external deps)
The same kind of notebook, exported to static HTML and served from this site. No external services needed.
Tip
Try moving the sliders — the plot updates instantly. Everything runs client-side.
How it’s made:
marimo export html-wasm marimo/demo-wasm.py \
-o quartz/static/marimo/demo-wasm --mode runMethod 3: marimo Islands (inline cells)
Individual cells embedded directly in the page — no iframe, no separation. The cells below are reactive and connected to each other: edit the code or change a variable upstream and the downstream cell re-executes.
Loading marimo islands...
How it’s made:
from marimo import MarimoIslandGenerator
generator = MarimoIslandGenerator()
block = generator.add_code("import marimo as mo")
# ... add more cells ...
await generator.build()
# generator.render_head() in <head>, block.render() in bodyQuick comparison
| Method | Setup | External deps | Offline | Best for |
|---|---|---|---|---|
| molab | 2 min (paste URL) | marimo.app | ❌ | Quick demos, prototyping |
| Self-hosted | 5 min + build step | None | ✅ | Production sites |
| Islands | Python script | CDN (islands runtime) | ✅ | Inline cell-level interactivity |