What is Router?

@beforesemicolon/router is a Web Component based routing solution for single-page apps, multi-page apps, and hybrid sites that want client-side navigation without adopting a framework router.

It uses custom elements, so routes live in the same HTML structure as the views they control. You can start with static markup, add lazy route files as the app grows, and reach for JavaScript APIs only when you need guards, analytics, programmatic navigation, or bundler integration.

Execution Model

The router resolves page activations through a central matching engine:

Key Features

edit this doc