{"id":18217957,"url":"https://github.com/mateothegreat/svelte5-router","last_synced_at":"2026-02-07T23:39:28.514Z","repository":{"id":259984171,"uuid":"879979859","full_name":"mateothegreat/svelte5-router","owner":"mateothegreat","description":"🫦 An SPA router for Svelte that allows you to divide \u0026 conquer your app with nested routers, snippets, and more.","archived":false,"fork":false,"pushed_at":"2025-10-29T07:28:03.000Z","size":17588,"stargazers_count":296,"open_issues_count":23,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-22T20:52:09.393Z","etag":null,"topics":["spa-router","svelte-router","svelte5","svelte5-router"],"latest_commit_sha":null,"homepage":"https://demo.router.svelte.spa","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mateothegreat.png","metadata":{"files":{"readme":"docs/readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-28T22:30:58.000Z","updated_at":"2025-12-22T15:55:43.000Z","dependencies_parsed_at":"2025-02-22T22:25:19.800Z","dependency_job_id":"9c25aa45-c5a7-4d49-a110-6d40f78c1ccf","html_url":"https://github.com/mateothegreat/svelte5-router","commit_stats":null,"previous_names":["mateothegreat/svelte5-router"],"tags_count":214,"template":false,"template_full_name":null,"purl":"pkg:github/mateothegreat/svelte5-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateothegreat%2Fsvelte5-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateothegreat%2Fsvelte5-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateothegreat%2Fsvelte5-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateothegreat%2Fsvelte5-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateothegreat","download_url":"https://codeload.github.com/mateothegreat/svelte5-router/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateothegreat%2Fsvelte5-router/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29212760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T23:36:15.537Z","status":"ssl_error","status_checked_at":"2026-02-07T23:36:12.879Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["spa-router","svelte-router","svelte5","svelte5-router"],"created_at":"2024-11-03T18:00:39.391Z","updated_at":"2026-02-07T23:39:28.509Z","avatar_url":"https://github.com/mateothegreat.png","language":"TypeScript","funding_links":[],"categories":["Routers"],"sub_categories":["Internationalization"],"readme":"# Svelte 5 SPA Router 🚀 🔥\n\n![logo](https://raw.githubusercontent.com/mateothegreat/svelte5-router/refs/heads/dev/docs/assets/logo-1000px.png)\n\n\u003cimg src=\"https://raw.githubusercontent.com/mateothegreat/svelte5-router/refs/heads/dev/docs/assets/coverage.svg?sanitize=true\" /\u003e\n\nAn SPA router for Svelte that allows you to divide \u0026 conquer your app with nested routers, snippets, and more.\n\n\u003e [!NOTE]\n\u003e Live demo: \u003chttps://demo.router.svelte.spa\u003e\n\u003e\n\u003e API documentation: \u003chttps://docs.router.svelte.spa\u003e\n\n## Features\n\n- Built for Svelte 5 🚀!\n- Divide \u0026 conquer - use nested routers all over the place.\n- Use components, snippets, or both 🔥!\n- Use regex paths (e.g. `/foo/(.*?)/bar`) and/or named parameters together.\n- Use async routes simply with `component: async () =\u003e import(\"./my-component.svelte\")`.\n- Add hooks to your routes to control the navigation flow 🔧.\n- Automagic styling of your anchor tags 💄.\n- Helper methods 🛠️ to make your life easier.\n- Debugging tools included 🔍.\n\n## Latest News\n\n### July 1, 2025\n\nVersion 2.15.4 released! 🎉 with some healthy updates!\n\n- 🔧 Added support for passing your own props down to the routed component ([#70](https://github.com/mateothegreat/svelte5-router/issues/70) - thanks [@inZaCz](https://github.com/inZaCz)).\n- 🐛 Fixed a bug where the router would not re-render the same component when the route changes.\n- 📊 Added [Router Architecture Diagrams](./diagrams.md) to give you a better understanding of how the router works.\n- 🎉 New demos for more patterns and use cases at \u003chttps://demo.router.svelte.spa/patterns\u003e.\n\n\u003e [!NOTE]\n\u003e I'd like to share what svelte5-router is doing in the wild! If you're using it, please share your project with me by sending me a message on discord at [@mateothegreat](https://discord.com/users/505520869246763009) or just create a [new issue](https://github.com/mateothegreat/svelte5-router/issues/new) and I'll add it to the list. 🙏\n\n## Installation\n\n```bash\nnpm install @mateothegreat/svelte5-router\n```\n\nNow you can simply:\n\n```svelte\n\u003ca href=\"/dashboard\" use:route\u003eDashboard\u003c/a\u003e\n```\n\nBy adding `use:route` you will prevent the page from reloading and instead let the router take the wheel 🤸. Peruse the rest of the documentation at [docs/](docs/) for more details.\n\n\u003e [!NOTE]\n\u003e Without `use:route` the website will be reloaded after opening a new route. To prevent this use `goto()` or `use:route` so only the Route element get's changed.\n\nand `/ship-it`!\n\n\u003e See [actions.md#route](actions.md#route) for the deets..\n\n## Table of Contents\n\n- [Getting Started](./getting-started.md)\n- [Routing](./routing.md)\n- [Hooks](./hooks.md)\n- [Actions](./actions.md)\n- [Helper Methods](./helpers.md)\n- [Default Status Mapping](./statuses.md)\n- [The Router Registry](./registry.md)\n- [Route Styling](./styling.md)\n- [Accessing Props](./props.md)\n- [Debugging](./debugging.md)\n- [Diagrams](./diagrams.md)\n\n\u003e [!NOTE]\n\u003e Include [llms.txt](../llms.txt) in your LLM prompt to get add rich context to your tasks by referencing `https://raw.githubusercontent.com/mateothegreat/svelte5-router/refs/heads/main/llms.txt`.\n\n## How it works\n\nWhen the browser URL changes, the router instance is triggered. It then registers the route in the registry, evaluates the route matching, and resolves the route.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./diagrams/router-architecture.png\" alt=\"Router Architecture\" /\u003e\n\u003c/div\u003e\n\n\u003e [!NOTE]\n\u003e You can view more diagrams in [diagrams.md](./diagrams.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateothegreat%2Fsvelte5-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateothegreat%2Fsvelte5-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateothegreat%2Fsvelte5-router/lists"}