@stencil/router

Stencil Router

Usage no npm install needed!

<script type="module">
  import stencilRouter from 'https://cdn.skypack.dev/@stencil/router';
</script>

README

npm

Stencil Router

A simple router, inspired by React Router v4, for Stencil apps and vanilla Web Component apps.

<stencil-router>
  <stencil-route-switch scrollTopOffset={0}>
    <stencil-route url="/" component="landing-page" exact={true} />
    <stencil-route url="/demos" component="demos-page" />
    <stencil-route url="/other" component="other-page" />
    <stencil-route component="page-not-found" />
  </stencil-route-switch>
</stencil-router>

Included components and all other information can be found in our wiki.