sv-router
April 21, 2026 ยท View on GitHub
sv-router
Flexible, ergonomic, and complete Svelte 5 router.
Documentation โข Getting Started โข Reference
Features
- ๐ Type-safe navigation: Catch broken links before you ship.
- ๐๏ธ File-based routing (optional): DX of a meta-framework-like approach.
- ๐ชถ Lightweight: < 5kB gzipped.
- โก Performance: Built-in code splitting and preloading.
- ๐ Reactive search params: For simpler state management in the URL.
- ๐ฟ Nested routes: Share layouts across pages.
- ๐ก๏ธ Hooks: For navigation guards, data loading, or analytics tracking.
- #๏ธโฃ Hash-based routing: Works inside Electron/Tauri.
Getting Started
Kickstart a new project:
npm create sv-router
...or add it to an existing project:
npm install sv-router
License
MIT ยฉ Colin Lienard