{"id":14971098,"url":"https://github.com/nanxiaobei/react-slide-routes","last_synced_at":"2025-04-12T23:38:22.094Z","repository":{"id":42134387,"uuid":"273732104","full_name":"nanxiaobei/react-slide-routes","owner":"nanxiaobei","description":"🏄‍♂️ The easiest way to slide React routes","archived":false,"fork":false,"pushed_at":"2025-02-20T13:59:22.000Z","size":3365,"stargazers_count":98,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T23:38:18.951Z","etag":null,"topics":["animation","motion","react","route","router","routes","slide","transition"],"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/nanxiaobei.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":"2020-06-20T15:15:22.000Z","updated_at":"2025-04-03T03:42:54.000Z","dependencies_parsed_at":"2023-02-01T04:01:09.624Z","dependency_job_id":"b99a70e3-0545-4a21-a223-486da6fe1590","html_url":"https://github.com/nanxiaobei/react-slide-routes","commit_stats":{"total_commits":173,"total_committers":4,"mean_commits":43.25,"dds":0.1445086705202312,"last_synced_commit":"93b222001c24b85375c7d55bba17c78673e5248c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanxiaobei%2Freact-slide-routes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanxiaobei%2Freact-slide-routes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanxiaobei%2Freact-slide-routes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanxiaobei%2Freact-slide-routes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanxiaobei","download_url":"https://codeload.github.com/nanxiaobei/react-slide-routes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"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","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":["animation","motion","react","route","router","routes","slide","transition"],"created_at":"2024-09-24T13:44:42.781Z","updated_at":"2025-04-12T23:38:22.075Z","avatar_url":"https://github.com/nanxiaobei.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cp\u003e\u003ca href=\"https://kee.so/\" target=\"_blank\"\u003e\u003cimg src=\"https://i.imgur.com/x5SRUoo.png\" alt=\"kee.so\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\nCreate now ➫ [🔗 kee.so](https://kee.so/)\n\n\u003c/div\u003e\n\n---\n\n# react-slide-routes 🏄‍♂️\n\nThe easiest way to slide React routes\n\n[![npm](https://img.shields.io/npm/v/react-slide-routes.svg?style=flat-square)](https://www.npmjs.com/package/react-slide-routes)\n[![npm](https://img.shields.io/npm/dt/react-slide-routes?style=flat-square)](https://www.npmtrends.com/react-slide-routes)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-slide-routes?style=flat-square)](https://bundlephobia.com/result?p=react-slide-routes)\n[![npm peer dependency version](https://img.shields.io/npm/dependency-version/react-slide-routes/peer/react?style=flat-square)](https://github.com/facebook/react)\n[![npm peer dependency version](https://img.shields.io/npm/dependency-version/react-slide-routes/peer/react-router?style=flat-square)](https://github.com/remix-run/react-router/tree/main/packages/react-router)\n[![GitHub](https://img.shields.io/github/license/nanxiaobei/react-slide-routes?style=flat-square)](https://github.com/nanxiaobei/react-slide-routes/blob/main/LICENSE)\n\n---\n\n\u003cimg src=\"live.gif\" alt=\"live\" height=\"320\" /\u003e\n\n## Fit\n\nReact Router v6\n\n\u003e For React Router v5, please use [`react-slide-routes@1.1.0`](https://github.com/nanxiaobei/react-slide-routes/blob/367ff0dfa94c9ff3234fc55493c27e3a53996ccd/README.md) and note that the usage is different.\n\n## Add\n\n```shell script\npnpm add react-slide-routes\n# or\nyarn add react-slide-routes\n# or\nnpm i react-slide-routes\n```\n\n## Use\n\n```jsx\nimport { Route } from 'react-router-dom';\nimport SlideRoutes from 'react-slide-routes';\n\nconst App = () =\u003e (\n  \u003cSlideRoutes\u003e\n    \u003cRoute path=\"/\" element={\u003cHome /\u003e} /\u003e\n    \u003cRoute path=\"/about\" element={\u003cAbout /\u003e} /\u003e\n    \u003cRoute path=\"/contact\" element={\u003cContact /\u003e} /\u003e\n  \u003c/SlideRoutes\u003e\n);\n```\n\n[![Edit react-slide-routes](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-slide-routes-bnzlu?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## API\n\n| Prop        | Type       | Required | Default   | Description                                                                                                                                                                                                                       |\n| ----------- | ---------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `animation` | `string`   |          | `'slide'` | Animation effect type, `'slide'`, `'vertical-slide'`, or `'rotate'`                                                                                                                                                               |\n| `duration`  | `number`   |          | `200`     | `transition-duration` in `ms`                                                                                                                                                                                                     |\n| `timing`    | `string`   |          | `'ease'`  | `transition-timing-function`, one of `'ease'` `'ease-in'` `'ease-out'` `'ease-in-out'` `'linear'`                                                                                                                                 |\n| `destroy`   | `boolean`  |          | `true`    | If `false`, prev page will still exits in dom, just invisible                                                                                                                                                                     |\n| `compare`   | `function` |          | -         | Function to sort the routes' order (defaults to the definition order). `compare` will be used to `routes.sort((a, b) =\u003e compare(a, b))`, `routes` is the param to [`useRoutes`](https://reactrouter.com/en/main/hooks/use-routes) |\n\n## License\n\n[MIT License](https://github.com/nanxiaobei/react-slide-routes/blob/main/LICENSE) © [nanxiaobei](https://lee.so/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanxiaobei%2Freact-slide-routes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanxiaobei%2Freact-slide-routes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanxiaobei%2Freact-slide-routes/lists"}