{"id":25191785,"url":"https://github.com/supertigerdev/solid-navigator","last_synced_at":"2025-10-08T15:52:01.836Z","repository":{"id":218035439,"uuid":"745118676","full_name":"SupertigerDev/solid-navigator","owner":"SupertigerDev","description":"Solid Navigator is router library that is inspired by vue-router and @solidjs/router.","archived":false,"fork":false,"pushed_at":"2024-07-26T11:32:29.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T01:17:23.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/SupertigerDev.png","metadata":{"files":{"readme":"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}},"created_at":"2024-01-18T17:17:22.000Z","updated_at":"2024-07-26T11:32:32.000Z","dependencies_parsed_at":"2024-01-19T11:27:55.763Z","dependency_job_id":"82c49cc8-8c21-49b4-afd7-150b7fb9a68f","html_url":"https://github.com/SupertigerDev/solid-navigator","commit_stats":null,"previous_names":["supertigerdev/solid-navigator"],"tags_count":0,"template":false,"template_full_name":"solidjs-community/solid-lib-starter","purl":"pkg:github/SupertigerDev/solid-navigator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupertigerDev%2Fsolid-navigator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupertigerDev%2Fsolid-navigator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupertigerDev%2Fsolid-navigator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupertigerDev%2Fsolid-navigator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SupertigerDev","download_url":"https://codeload.github.com/SupertigerDev/solid-navigator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupertigerDev%2Fsolid-navigator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278972330,"owners_count":26078017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-02-09T22:36:38.327Z","updated_at":"2025-10-08T15:52:01.803Z","avatar_url":"https://github.com/SupertigerDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n  \u003cimg width=\"100%\" src=\"https://assets.solidjs.com/banner?type=solid-navigator\u0026background=tiles\u0026project=%20\" alt=\"solid-navigator\"\u003e\n\u003c/p\u003e\n\n# solid-navigator\n\n[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge\u0026logo=pnpm)](https://pnpm.io/)\n\nSolid Navigator is a library that is inspired by vue-router and @solidjs/router.\n\n\n## Quick start\n\nInstall it:\n\n```bash\nnpm i solid-navigator\n# or\npnpm add solid-navigator\n```\n\nUse it:\n\n```tsx\nimport { Router, Route, Outlet, A, Navigate, useNavigate, useLocation, useParams,  useMatch, useSearchParams } from 'solid-navigator'\n```\n\n\n## Methods\n\n### `useNavigate`\n```js\nconst navigate = useNavigate();\nnavigate(\"/app\", {replace: true})\n```\n\n### `useLocation`  \n```js\n// path: /app?id=1\nconst location = useLocation();\n{\n  query: {id: string} \n  search: string\n  pathname: string\n  hash: string\n}\n```\n\n### `useParams`\n```js\n// path: /chats/:id\nconst params = useParams\u003c{id: string}\u003e();\n{\n  id: string\n}\n```\n\n### `useMatch`\n```js\n// path: /chats/1234\nconst match = useMatch(() =\u003e \"/chats/1234\");\n{\n  path: \"/chats/1234\"\n  params: {}\n} | null\n```\n\n### `useSearchParams`\n```js\n// path: /chats?id=1234\nconst [params, setParams] = useSearchParams();\nparams = {\n  id: \"1234\"\n} | null\n\nsetParams({id: \"5678\", hello: \"Bye\"}) // path: /chats?id=5678\u0026hello=Bye\n```\n\n## Components\n\n### `Router`  \n```jsx\nconst Root = () =\u003e {\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003eHeader\u003c/h1\u003e\n      \u003cOutlet/\u003e\n    \u003c/div\u003e\n  )\n}\n\nconst Main = () =\u003e {\n  return (\n    \u003cRouter root={Root}\u003e\n      // Routes go here\n    \u003c/Router\u003e\n  )\n}\n```\n\n### `Outlet`\n```jsx\nconst Main = () =\u003e {\n\n  const AppComponent = () =\u003e {\n    return (\n      \u003cdiv\u003e\n        \u003cdiv\u003e\u003cOutlet name=\"drawer\"/\u003e\u003c/div\u003e\n        \u003cdiv\u003e\u003cOutlet name=\"content\"/\u003e\u003c/div\u003e\n      \u003c/div\u003e\n    )\n  }\n\n  return (\n    \u003cRouter root={Root}\u003e\n      \u003cRoute path=\"/\" component={AppComponent}\u003e\n        \u003cRoute \n          components={{\n            drawer: Drawer,\n            content: Content\n          }} \n        /\u003e\n      \u003c/Route\u003e\n    \u003c/Router\u003e\n  )\n}\n```\n\n### `A` \n```tsx\nconst App = () =\u003e {\n  return (\n    \u003cA href=\"/\" replace /\u003e\n  )\n}\n```\n\n### `Navigate` \n```tsx\nconst App = () =\u003e {\n  return (\n    \u003cNavigate to=\"/\" /\u003e\n  )\n}\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupertigerdev%2Fsolid-navigator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupertigerdev%2Fsolid-navigator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupertigerdev%2Fsolid-navigator/lists"}