An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# Svelte 5 SPA Router 🚀 🔥

![logo](/docs/logo.png)

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)