Examples
Every example app in the repository, and every live mount of the sample app. Run it opens the built app this site serves; Open in StackBlitz boots an editable workspace installed from the published npm packages. The tutorial walks through three of them in order, starting with Hello World. Embedded in names the pages that run an example inline; Live examples runs the ones no other page embeds.
Each entry lists its facets, read from the example's own files:
- kind:
tutorialfor a tutorial rung or a variant of one,examplefor an app that shows one feature,sample-appfor a live sample-app mount. - lang:
tsorjs. - location: the location plugin it hands the router:
navigation,pushStateorhash. A hash URL keeps navigation inside an embed's frame. The sample apps choose theirs at boot, so they carry none. - bindings: the reactivity bindings it uses:
none,mobx,signalsoreffect. - render:
clientwhen the browser renders every page,prerenderwhen a build writes them withlit-ui-router-ssr. - registry:
onwhen it types its state names withui-router-registry. - lint:
onwhen it runseslint-plugin-lit-ui-router.
Tutorial
Hello World
Ultra-minimal starter: two states with uiSref/uiSrefActive navigation.
- Facets: kind
tutorial· langts· locationhash· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Hello World
Hello World (No Build)
The same starter in plain JavaScript: an import map to a CDN, no TypeScript and no build step.
- Facets: kind
tutorial· langjs· locationhash· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Live examples
Hello Solar System
Solar System tour: route parameters and async resolve data with a master/detail flow.
- Facets: kind
tutorial· langts· locationhash· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Hello Solar System
Hello Solar System (MobX)
The same tour rebuilt on lit-ui-router-mobx: an observable router store, reactions, and a computed tour.
- Facets: kind
tutorial· langts· locationhash· bindingsmobx· renderclient· registryon· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Reactive Components, lit-ui-router-mobx
Hello Solar System (Signals)
The same tour with lit-ui-router-signals and @lit/context: a provided unit signal, the consumed router.
- Facets: kind
tutorial· langts· locationhash· bindingssignals· renderclient· registryon· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Live examples
Hello Galaxy
Milky Way explorer: nested states and views, resolve inheritance, and a 3D model-viewer surprise.
- Facets: kind
tutorial· langts· locationhash· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: View Fallback Content, Hello Galaxy
Hello Galaxy (Effect)
The same explorer rebuilt on Effect: typed resolve inheritance, state-scoped fibers, and interruptible loads.
- Facets: kind
tutorial· langts· locationhash· bindingseffect· renderclient· registryon· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Live examples
Hello Galaxy (Signals)
The same explorer with both Lit signal bindings: a star chart shared by nested views, route-driven crumbs.
- Facets: kind
tutorial· langts· locationhash· bindingssignals· renderclient· registryon· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Live examples
Examples
Hello Solar System (Eleventy SSR)
The same tour prerendered by Eleventy and lit-ui-router-ssr: static pages, a 404 page and redirect rules, adopted on boot.
- Facets: kind
example· langts· locationpushState· bindingsnone· renderprerender· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Prerender with Eleventy
Hello Solar System (Vite SSR)
The same tour prerendered by vite build alone: serverRouterPlugin and one prerender script.
- Facets: kind
example· langts· locationpushState· bindingsnone· renderprerender· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Prerender with Vite
Design System Links
uiSref driving a design-system link element (<sp-link>): assignHref: true vs 'auto'.
- Facets: kind
example· langts· locationhash· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Design System Links
ESLint Plugin
eslint-plugin-lit-ui-router the ESLint-only way, with the lint report rendered in the page.
- Facets: kind
example· langts· locationhash· bindingsnone· renderclient· registryoff· linton - Run it · Open in StackBlitz · Source
- Embedded in: ESLint Plugin
Navigation API
ui-router-navigation-location-plugin with an app navigate listener that holds a link leaving the app.
- Facets: kind
example· langts· locationnavigation· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Navigation API Plugin
Loading and Error Views
Per-route pending and error views from transition hooks and inherited data, a NOWAIT resolve, and retry.
- Facets: kind
example· langts· locationhash· bindingsnone· renderclient· registryoff· lintoff - Run it · Open in StackBlitz · Source
- Embedded in: Loading and Error Views
Sample apps
Vanilla sample app
MobX sample app
- Facets: kind
sample-app· bindingsmobx· renderclient· registryon· lintoff - Open
/app-mobx· Source
Effect sample app
- Facets: kind
sample-app· bindingseffect· renderclient· registryon· lintoff - Open
/app-effect· Source
Signals sample app
- Facets: kind
sample-app· bindingssignals· renderclient· registryon· lintoff - Open
/app-signals· Source
Hash sample app
- Facets: kind
sample-app· bindingsnone· renderclient· registryon· lintoff - Open
/app-hash· Source
Elsewhere
This site is a consumer too: its worker answers each request with ui-router-server, and renders the release pages with lit-ui-router-ssr. How this site runs describes it, and the server-side overview lists it beside the other hosts.
The Altitude Atlas draws the packages and their sources as interactive models; it is built from this repository too.