# ItalyPaleAle/svelte-spa-router

Router for SPAs using Svelte

Repository: https://github.com/ItalyPaleAle/svelte-spa-router
Canonical: https://ross.abutalabs.com/products/svelte-spa-router
Homepage: https://svelte-spa-router.italypaleale.me
Language: Svelte
License: MIT
License Family: permissive
Last push: 2026-08-23T04:11:20+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 90, longevity 100
- inputs: {"age_days": 2669, "days_push": 10, "days_rel": 69, "gap_med": 21.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1606, forks 104 (observed 2026-08-28T04:05:10.495136+00:00)

## What it is
svelte-spa-router is a hash-based router library for Svelte 5 single-page applications with a minimal footprint. It supports route parameters, regular expression routes, active links, programmatic navigation, and code splitting via dynamic imports.

## Use cases
- add client-side routing to a Svelte SPA
- route without needing server-side URL rewriting
- handle route parameters like /book/:id in a Svelte app
- lazy-load route components for code splitting
- highlight active navigation links
- build a fully static SPA hosted on any static file server

## When to choose
- building a static single-page app with Svelte 5 where SEO is not a concern
- you want hash-based routing that works without any backend server
- you need a tiny, simple router with route params, regex routes, and code splitting

## When to avoid
- you need SEO-friendly clean URLs with the HTML5 history API
- your app is server-rendered (SSR) or uses SvelteKit's built-in routing
- you are not using Svelte

## Facets
- artifact type: library
- maturity: stable
- function: routing, frontend-framework
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: svelte, spa, hash-routing, router, single-page-app, nodejs

## Member repositories
- ItalyPaleAle/svelte-spa-router (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:10.495136+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:51:49.071948+00:00, confidence not recorded.
  - readme: https://github.com/ItalyPaleAle/svelte-spa-router (fetched 2026-08-28T04:05:10.495136+00:00, sha 0e0423fa3812)
  - homepage: https://svelte-spa-router.italypaleale.me (fetched 2026-08-29T11:24:06.004157+00:00, sha 26c726ddd53c)
  - site_page: https://svelte-spa-router.italypaleale.me/docs (fetched 2026-08-29T11:24:06.006713+00:00, sha 0ac2f4647d46)
  - site_page: https://svelte-spa-router.italypaleale.me/docs/getting-started (fetched 2026-08-29T11:24:06.009856+00:00, sha 4e8fbe63f2dc)
  - site_page: https://svelte-spa-router.italypaleale.me/docs/navigation (fetched 2026-08-29T11:24:06.013102+00:00, sha 12325a3542ff)
  - site_page: https://svelte-spa-router.italypaleale.me/docs/route-parameters (fetched 2026-08-29T11:24:06.015499+00:00, sha da44ef63e0e9)
  - site_page: https://svelte-spa-router.italypaleale.me/docs/active-links (fetched 2026-08-29T11:24:06.017657+00:00, sha dcc3f1fa1c59)
  - site_page: https://svelte-spa-router.italypaleale.me/docs/regular-expression-routes (fetched 2026-08-29T11:24:06.019731+00:00, sha 3462e370f5b6)
  - site_page: https://svelte-spa-router.italypaleale.me/docs/code-splitting (fetched 2026-08-29T11:24:06.021685+00:00, sha b117ef29a96d)
  - registry_npm: https://registry.npmjs.org/svelte-spa-router (fetched 2026-08-29T11:24:06.023526+00:00, sha 715e722e885f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
