Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

colinlienard/sv-router

Repository files navigation

sv-router

npm install size

A feature-rich yet intuitive routing library for Svelte single-page apps.

Documentation β€’ Getting Started β€’ Reference


Features

  • πŸ”’ Typesafe navigation: Get autocomplete and type checking for your routes.
  • πŸ”„ Flexibility: Choose between code-based or file-based routing approaches.
  • 🌿 Nested routes: Create complex layouts with ease.
  • πŸ” Reactive search params: For simpler state management in the URL.
  • πŸ›‘οΈ Hooks: For navigation guards, data loading, or analytics tracking.
  • ⚑ Performance: Optimized for speed with built-in code splitting and preloading.
  • 🧩 Familiar API: Follows established conventions from popular meta frameworks.
  • πŸͺΆ Lightweight: Minimal impact on your bundle size.
  • πŸš€ Made for Svelte 5: True Svelte 5 implementation with the latest features.
  • #️⃣ Hash-based routing: Hash-based routing enables usage in local environments.

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

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /