Multi-page Navigation
Sparkling uses a native container model where each page runs as an independent native container with its own LynxView. Navigation between pages is driven by scheme URLs.
Every entry you define in source.entry of your build config — whether that's the lynxConfig inside app.config.ts or a standalone lynx.config.ts — produces a bundle that can be navigated to. There is no route registration step: once a bundle is built, any page can navigate to it by its bundle path using the navigate() function.
How it works
When you call navigate(), Sparkling:
- Builds a scheme URL (e.g.
hybrid://lynxview_page?bundle=detail.lynx.bundle&title=Detail) - Hands the URL to the native layer, which opens a new container
- The new container loads the target bundle and receives the URL's query parameters via
lynx.__globalProps.queryItems
Basic navigation
Use navigate() from sparkling-navigation to open another page by its bundle path:
The params object supports all predefined keys (title, hide_nav_bar, screen_orientation, etc.) as well as arbitrary custom keys.
Passing custom data
Any key you add to params is appended to the scheme URL as a query parameter. On the target page, read it from lynx.__globalProps.queryItems:
Page A — sender:
Page B — receiver:
All query-item values arrive as strings. Parse them if you need other types (e.g.
Number(itemId)).
Closing a page
Call close() to dismiss the current page and return to the previous one:
You can also close a specific container by ID:
Full example
Below is a minimal two-page app.

