Examples
Sparkling ships a gallery of runnable Lynx examples. Each one is embedded with
the <Go> component, which lets you:
- Browse the source — read the full example, file by file.
- Preview on the web — run the Lynx page live in your browser.
- Scan to run on device — open it in Lynx Explorer (with Sparkling integrated) via QR code, where the native APIs actually run.
The web preview renders the UI in your browser, but Sparkling's native method bridges (navigation, storage, media, global props) only run inside a Sparkling container. To exercise those, use the QR code tab and open the example in Lynx Explorer on your phone.
Hello World
A minimal Sparkling Lynx page with a tap counter.
Sparkling Go demos
The Sparkling Go playground is a full app demonstrating every built-in capability. Its demos are grouped by feature:
- Navigation — scheme-driven push/pop and passing data between pages.
- Scheme — build and preview Sparkling scheme URLs.
- Global Props — read device, screen, and container info.
- Storage — persist and read key–value data.
- Media — choose, upload, and download media.
Framework integrations
- TanStack Router — a type-safe web router driving native multi-page navigation. In-page routing runs live in the web preview. See the design guide for the architecture and feature support matrix.
How it works
Every folder under examples/* and the packages/playground app is turned into
a live embed by packages/website/scripts/prepare-examples.mjs: it builds each
example (a *.web.bundle for the browser and a *.lynx.bundle for the device),
writes a go-web example-metadata.json, and copies the result into
public/examples/<name>/. The <Go> component reads that metadata.

