# Documentation ## Page index - Router: / - A tiny Web Component router for HTML-first apps. Declare links, routes, redirects, query routes, lazy pages, guards, and route data without framework lock-in. - What is Router?: /documentation/ - Learn how Before Semicolon Router brings declarative, lazy, guarded, framework-agnostic routing to HTML, Web Components, SPAs, MPAs, and hybrid apps. - Get Started: /documentation/get-started - Build your first HTML-first Router app with page-link, page-route, page-data, lazy route files, and 404 redirects. - Installation: /documentation/installation - Install @beforesemicolon/router with npm, yarn, pnpm, or direct browser script tags for HTML-first Web Component routing. - Guide & Best Practices: /documentation/guide-best-practices - Practical guidance for building maintainable HTML-first routing with Before Semicolon Router, including route structure, redirects, guards, links, and lazy loading. - AI Guide: /documentation/ai - A compact reference for AI assistants and developers generating Router code, with accurate components, APIs, patterns, and constraints. - Page Route: /documentation/web-components/page-route - Learn how to render pathname routes, dynamic params, nested layouts, lazy route files, component props, loading slots, fallbacks, and route groups. - Page Route Query: /documentation/web-components/page-route-query - Learn how to render views conditionally based on search queries using ``. - Page Link: /documentation/web-components/page-link - Learn how to manage active states, relative path resolution, and pass history payload data using ``. - Page Redirect: /documentation/web-components/page-redirect - Learn how to manage default paths and handle 404 fallbacks using ``. - Page Data: /documentation/web-components/page-data - Learn how to display pathname params, search query values, and history state payload values in HTML using ``. - Navigation APIs: /documentation/routing-apis/navigation - Learn how to transition paths, pass payloads, and go back/forward in history using JavaScript. - Subscribing APIs: /documentation/routing-apis/subscribing - Learn how to observe route patterns or listen to global navigation events. - Params & Queries: /documentation/routing-apis/params-queries - Learn how to retrieve pathname parameters, read search queries, and update search queries. - Route Registration: /documentation/routing-apis/registration - Learn how to register pathname patterns and compile paths using JavaScript. - Route Guards: /documentation/advanced-features/route-guards - Learn how to secure paths and perform checks before transitioning using route guards. - Hash Routing: /documentation/advanced-features/hash-routing - Learn how to set up URL hash-based routing (#/path) for static hosting environments. - Module Registry: /documentation/advanced-features/module-registry - Learn how to pre-register page modules for code splitting and bundler integration. - Route Metadata: /documentation/advanced-features/route-metadata - Learn how to attach permissions, layouts, or custom page properties to routes. - Component Prop: /documentation/advanced-features/component-prop - Learn how to pass component references directly to routes for type safety and bundler compilation.