https://github.com/mateothegreat/svelte5-router
An SPA router for Svelte that allows you to divide & conquer your app with nested routers.
https://github.com/mateothegreat/svelte5-router
spa-router svelte-router svelte5 svelte5-router
Last synced: 13 days ago
JSON representation
An SPA router for Svelte that allows you to divide & conquer your app with nested routers.
- Host: GitHub
- URL: https://github.com/mateothegreat/svelte5-router
- Owner: mateothegreat
- License: mit
- Created: 2024-10-28T22:30:58.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-03-27T17:51:59.000Z (20 days ago)
- Last Synced: 2025-03-27T18:44:15.592Z (20 days ago)
- Topics: spa-router, svelte-router, svelte5, svelte5-router
- Language: TypeScript
- Homepage: https://demo.router.svelte.spa
- Size: 15.1 MB
- Stars: 151
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: docs/readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-svelte - svelte5-router - First Svelte 5 SPA router with nesting, hooks, and more.. Use components, snippets, or both! (Routers / Internationalization)
README
# Svelte 5 SPA Router 🚀 🔥

An SPA router for Svelte that allows you to divide & conquer your app with nested routers, snippets, and more.
> [!NOTE]
> Live demo:
>
> API documentation:## Features
- Built for Svelte 5 🚀!
- Divide & conquer - use nested routers all over the place.
- Use components, snippets, or both 🔥!
- Use regex paths (e.g. `/foo/(.*?)/bar`) and/or named parameters together.
- Use async routes simply with `component: async () => import("./my-component.svelte")`.
- Add hooks to your routes to control the navigation flow 🔧.
- Automagic styling of your anchor tags 💄.
- Helper methods 🛠️ to make your life easier.
- Debugging tools included 🔍.## Installation
```bash
npm install @mateothegreat/svelte5-router
```## Table of Contents
- [Getting Started](https://github.com/mateothegreat/svelte5-router/blob/main/docs/getting-started.md)
- [Routing](https://github.com/mateothegreat/svelte5-router/blob/main/docs/routing.md)
- [Hooks](https://github.com/mateothegreat/svelte5-router/blob/main/docs/hooks.md)
- [Helper Methods](https://github.com/mateothegreat/svelte5-router/blob/main/docs/helpers.md)
- [Default Status Mapping](https://github.com/mateothegreat/svelte5-router/blob/main/docs/statuses.md)
- [The Router Registry](https://github.com/mateothegreat/svelte5-router/blob/main/docs/registry.md)
- [Route Styling](https://github.com/mateothegreat/svelte5-router/blob/main/docs/styling.md)
- [Accessing Props](https://github.com/mateothegreat/svelte5-router/blob/main/docs/props.md)
- [Debugging](https://github.com/mateothegreat/svelte5-router/blob/main/docs/debugging.md)