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 run

Method 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 body

Quick comparison

MethodSetupExternal depsOfflineBest for
molab2 min (paste URL)marimo.app❌Quick demos, prototyping
Self-hosted5 min + build stepNone✅Production sites
IslandsPython scriptCDN (islands runtime)✅Inline cell-level interactivity

Graph View