Demos

Every live demo on this site in one place: islands, the component lifecycle, tours, the dock, and Go handlers in a Web Worker.

Each demo below runs in your browser. It’s built from docsite/demos/ against the goapplib on main, and make exercise-docsite drives every one in headless Chromium before the site deploys. Each card links the demo on its own, the guide section that explains it, and its source.

Islands and components

When each island mounts

Four lazy islands, one per load strategy: at once, when the browser is idle, when the slot scrolls into view, and when a media query matches. A table shows which chunks have downloaded so far.

Guide · Open · Source

A Solid island over a placeholder

Go renders a placeholder into the slot, and a lazy SolidIsland takes the slot over once its chunk arrives.

Guide · Open · Source

One presenter, several islands

One presenter drives two Solid islands through a Port each. The second island mounts only when you scroll to it, and it still shows every pick you made.

Guide · Open · Source

The page lifecycle

A page starts its components in phases, then mounts a late component. Each lifecycle call goes into a log, in the order it ran.

Guide · Open · Source

A guided tour

The page dims, and the reader does each step in a small app. A step advances when the app reports the action, and a log shows which event moved it.

Guide · Open · Source

Docks and drawers

A dock of this site's pages

Open any page of this site as a panel, then move panels between the grid, a float and four drawers. A Solid counter and a notes box keep their state through every move, and a reload brings the layout back.

Guide · Open · Source

A phone page

One canvas fills the grid, and every other panel is a tab in a bottom sheet. The bar's buttons open a panel and close it on a second tap. Drag or flick the sheet to resize it.

Guide · Open · Source

Pinned drawers

An experiment: a pinned drawer pushes the grid aside instead of covering it. A results table answers the experiment's questions in your browser.

Guide · Open · Source

Popout windows

An experiment: each kind of panel goes out into its own window, gets used there, and comes back. A results table records what survived.

Guide · Open · Source

Go handlers in a Web Worker

A Connect service as wasm

A Go Connect service runs in a Web Worker. The page mounts files into the worker and calls the service through its generated client, with no server involved.

Guide · Open · Source

State, lanes and long jobs

A service keeps its state in the browser's cache, so a reload restores it. Quick queries and long jobs run in separate workers, and the demo streams a job, aborts one and hits a memory limit.

Guide · Open · Source

Coming next

The views, routing, templates and htmx guides walk through whole apps in docsite/examples/. GitHub Pages can’t run their Go server, so they have no live demo yet. #147 runs them in the browser through wasmhost.