{"id":21660161,"url":"https://github.com/react-navigation/animated-switch","last_synced_at":"2025-07-17T23:30:58.309Z","repository":{"id":66126647,"uuid":"179870701","full_name":"react-navigation/animated-switch","owner":"react-navigation","description":"A switch navigator but with transitions between screens powered by the react-native-reanimated Transitions API","archived":true,"fork":false,"pushed_at":"2020-02-24T17:36:01.000Z","size":420,"stargazers_count":158,"open_issues_count":1,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T04:53:13.263Z","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/react-navigation.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}},"created_at":"2019-04-06T18:22:48.000Z","updated_at":"2023-08-15T16:11:06.000Z","dependencies_parsed_at":"2023-06-28T09:57:12.133Z","dependency_job_id":null,"html_url":"https://github.com/react-navigation/animated-switch","commit_stats":{"total_commits":35,"total_committers":9,"mean_commits":3.888888888888889,"dds":0.7142857142857143,"last_synced_commit":"c9fbf8d364036e05a6ae1868e291aeb1ff6371ee"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-navigation%2Fanimated-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-navigation%2Fanimated-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-navigation%2Fanimated-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-navigation%2Fanimated-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-navigation","download_url":"https://codeload.github.com/react-navigation/animated-switch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226306099,"owners_count":17603931,"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":[],"created_at":"2024-11-25T09:32:22.917Z","updated_at":"2024-11-25T09:34:24.022Z","avatar_url":"https://github.com/react-navigation.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"This package has been moved to https://github.com/react-navigation/react-navigation/tree/4.x/packages/animated-switch\n\n---\n\n# react-navigation-animated-switch\n\nThis navigator uses the [Reanimated Transitions API](https://github.com/kmagiera/react-native-reanimated) to animate route change transitions. Aside from the animations, it is identical to the standard [switch navigator](https://reactnavigation.org/docs/en/switch-navigator.html).\n\n## Installation\n\n- [Install react-native-reanimated \u003e= 1.0.0](https://github.com/kmagiera/react-native-reanimated#installation) if you have not already (the alpha version will not work!). If you have a managed Expo project, you need to use \u003e= SDK 33 to have the correct version of Reanimated.\n- Install `react-navigation-animated-switch` with your favorite JS package manager.\n\n## Usage\n\n```js\nimport createAnimatedSwitchNavigator from 'react-navigation-animated-switch';\n\nconst MySwitch = createAnimatedSwitchNavigator({\n  Home: HomeScreen,\n  Other: OtherScreen,\n});\n```\n\nTa da! When you change between routes the screens will cross-fade with each other. You can customize the transition using the `transition` prop:\n\n```js\nimport createAnimatedSwitchNavigator from 'react-navigation-animated-switch';\nimport { Transition } from 'react-native-reanimated';\n\nconst MySwitch = createAnimatedSwitchNavigator(\n  {\n    Home: HomeScreen,\n    Other: OtherScreen,\n  },\n  {\n    transition: (\n      \u003cTransition.Together\u003e\n        \u003cTransition.Out\n          type=\"slide-bottom\"\n          durationMs={400}\n          interpolation=\"easeIn\"\n        /\u003e\n        \u003cTransition.In type=\"fade\" durationMs={500} /\u003e\n      \u003c/Transition.Together\u003e\n    ),\n  }\n);\n```\n\nIf you need to customize the underlying `Transitioning.View` style, you can pass in a `transitionViewStyle` option.\n\n```js\nimport createAnimatedSwitchNavigator from 'react-navigation-animated-switch';\nimport { Transition } from 'react-native-reanimated';\n\nconst MySwitch = createAnimatedSwitchNavigator(\n  {\n    Home: HomeScreen,\n    Other: OtherScreen,\n  },\n  {\n    transitionViewStyle: { backgroundColor: 'red' },\n  }\n);\n```\n\n[Learn more about the `Transition` API here](https://github.com/kmagiera/react-native-reanimated).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-navigation%2Fanimated-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-navigation%2Fanimated-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-navigation%2Fanimated-switch/lists"}