{"id":15169698,"url":"https://github.com/jcoreio/react-router-fader","last_synced_at":"2025-10-01T02:31:40.153Z","repository":{"id":57343820,"uuid":"97083665","full_name":"jcoreio/react-router-fader","owner":"jcoreio","description":"animated fade between child routes with react-router version 2 or 3","archived":true,"fork":false,"pushed_at":"2017-11-29T16:15:39.000Z","size":257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-26T09:49:12.105Z","etag":null,"topics":["animation","fade","react-component","react-router","react-router-v3","transition"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jcoreio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-13T05:31:50.000Z","updated_at":"2023-07-07T02:05:46.000Z","dependencies_parsed_at":"2022-09-12T06:50:58.084Z","dependency_job_id":null,"html_url":"https://github.com/jcoreio/react-router-fader","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Freact-router-fader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Freact-router-fader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Freact-router-fader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcoreio%2Freact-router-fader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcoreio","download_url":"https://codeload.github.com/jcoreio/react-router-fader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875271,"owners_count":16554661,"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","fade","react-component","react-router","react-router-v3","transition"],"created_at":"2024-09-27T07:21:13.544Z","updated_at":"2025-10-01T02:31:34.836Z","avatar_url":"https://github.com/jcoreio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-router-fader\n\n[![Build Status](https://travis-ci.org/jcoreio/react-router-fader.svg?branch=master)](https://travis-ci.org/jcoreio/react-router-fader)\n[![Coverage Status](https://coveralls.io/repos/github/jcoreio/react-router-fader/badge.svg?branch=master)](https://coveralls.io/github/jcoreio/react-router-fader?branch=master)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\nWraps [`react-fader`](https://github.com/jcoreio/react-fader) for use with\n[`react-router`](https://github.com/ReactTraining/react-router) version 2 or 3\n\nJust use it as the `component` of a parent route, and voila, you automatically get fade transitions between its child\nroutes!\n\n## Usage\n\n```sh\nnpm install --save react-fader react-router-fader\n```\n\n```js\nimport Fader from 'react-router-fader' // or react-router-fader/lib/withTransitionContext\n\n// example route components\nimport Home from './Home'\nimport Users from './Users'\nimport UserGroups from './UserGroups'\nimport Policies from './Policies'\n\n// use Fader as the component of your parent routes, like so:\n\nexport const rootRoute = {\n  component: Fader,\n  childRoutes: [\n    {\n      path: '/admin',\n      component: Fader,\n      childRoutes: [\n        {path: '/users', component: Users},\n        {path: '/userGroups', component: UserGroups},\n        {path: '/policies', component: Policies},\n      ],\n    },\n    {path: '/', component: Home},\n  ],\n}\n```\n\n## withTransitionContext\n\n```sh\nnpm install --save react-fader react-router-fader react-transition-context\n```\n```js\nimport Fader from 'react-router-fader/lib/withTransitionContext'\n```\n\nThis works exactly like `Fader` except that it renders its children within a `TransitionContext` component from\n`react-transition-context` with the given `transitionState`.  This is useful for doing things like focusing an `\u003cinput\u003e`\nelement after the children have transitioned in.\n\n## API\n\n#### `makeReactRouterFader(Fader: ReactClass\u003cFaderProps\u003e, extraProps?: $Shape\u003cFaderProps\u003e): ReactClass\u003cRouteProps\u003e`\n\n```js\nimport makeReactRouterFader from 'react-router-fader/lib/makeReactRouterFader'\n```\n\nThis is a HOC that is used by `import 'react-router-fader'` and `import `react-router-fader/lib/withTransitionContext`.\nThose modules use `{animateHeight: false}` for `extraProps`.  You can use this function to pass different props to the\nwrapped `Fader` component.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Freact-router-fader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcoreio%2Freact-router-fader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcoreio%2Freact-router-fader/lists"}