{"id":22131321,"url":"https://github.com/jpapillon/react-native-animated-router","last_synced_at":"2026-05-02T14:43:07.237Z","repository":{"id":57335344,"uuid":"108340668","full_name":"jpapillon/react-native-animated-router","owner":"jpapillon","description":"React Native router with full control on transition animations.","archived":false,"fork":false,"pushed_at":"2017-11-06T18:53:53.000Z","size":203,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-18T22:08:58.208Z","etag":null,"topics":["animations","react-native","router"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpapillon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-26T00:17:24.000Z","updated_at":"2017-10-27T16:31:08.000Z","dependencies_parsed_at":"2022-09-14T15:01:49.502Z","dependency_job_id":null,"html_url":"https://github.com/jpapillon/react-native-animated-router","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpapillon%2Freact-native-animated-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpapillon%2Freact-native-animated-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpapillon%2Freact-native-animated-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpapillon%2Freact-native-animated-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpapillon","download_url":"https://codeload.github.com/jpapillon/react-native-animated-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240828,"owners_count":20583102,"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":["animations","react-native","router"],"created_at":"2024-12-01T18:32:39.989Z","updated_at":"2026-05-02T14:43:02.212Z","avatar_url":"https://github.com/jpapillon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-animated-router\nReact Native router with full control on transition animations.\n\n**This library is currently in development.**\n\n## Installation\n```bash\nnpm install react-native-animated-router --save\n```\nor\n```bash\nyarn add react-native-animated-router\n```\n\n## Usage\n```js\nimport React, {Component} from 'react';\nimport {View} from 'react-native';\nimport {Router} from 'react-native-animated-router';\n\nimport Page1Screen from './Page1Screen';\nimport Page2Screen from './Page2Screen';\n\nconst routes = {\n  page1: {\n    screen: Page1Screen\n  },\n  page2: {\n    screen: Page2Screen\n  }\n};\n\nconst animations = {\n  'default': {\n    config: {                // Default configuration for all transition animations\n      duration: 3000,        // Duration of the animation transition\n      fn: Animated.spring,   // Function to use for launching the animation progress\n      useNativeDriver: true\n    },\n    push: {\n      config: {},            // Default configuration for all 'push' animations ('config' objects have all the same structure, as shown above)\n      fn: progress =\u003e {      // Default function used for animating the pushed view. It receives a progress (Animated.Value) of current transition progress\n        const translateX = progress.interpolate({\n          inputRange: [0, 1],\n          outputRange: [width, 0],\n        });\n\n        return {\n          transform: [{\n            translateX\n          }]\n        }\n      }     \n    },\n    blur: {\n      config: {},            // Default configuration for all 'blur' animations (animation on the screen which gets another one pushed over)\n      fn: progress =\u003e {}     // Default function used for animating the blurred view\n    },\n    focus: {\n      config: {},            // Etc.\n      fn: progress =\u003e {}\n    },\n    pop: {\n      config: {},\n      fn: progress =\u003e {}\n    }\n  },\n  custom: [{                 // This is where custom animations are defined (e.g. we want a specific animation from route 'page1' to 'page2'). Structure is the same as above.\n    from: 'page1',\n    to: 'page2',\n    config: {},\n    push: {\n      config: {},\n      fn: progress =\u003e {}\n    },\n    blur: {\n      config: {},\n      fn: progress =\u003e {}\n    },\n    focus: {\n      config: {},\n      fn: progress =\u003e {}\n    },\n    pop: {\n      config: {},\n      fn: progress =\u003e {}\n    }\n  }, {/* ... */}]\n}\n\nexport default class App extends Component {\n  render() {\n    return (\n      \u003cView style={{flex: 1}}\u003e\n        \u003cRouter routes={routes} animations={animations} /\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n```\n\n### Actions\n```js\nimport {Actions} from 'react-native-animated-router';\n\nActions.push('page1', {param1: \"Hello World\"});   // \u003c-- Will push 'page1' on stack\nActions.pop();    // \u003c-- Pops last view on stack\nActions.reset();    // \u003c-- Resets the stack to the first one\nActions.reset('page2', {param2: \"Test\"});   // \u003c-- Resets the stack to 'page2'\n```\n\n#### Example\n```js\n...\nimport {Actions} from 'react-native-animated-router';\n\nclass Page1Screen extends Component {\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cText\u003ePAGE 1!\u003c/Text\u003e\n        \u003cTouchableOpacity onPress={() =\u003e Actions.push(\"page2\", {})}\u003e\n          \u003cText\u003epush page 2\u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n        \u003cTouchableOpacity onPress={() =\u003e Actions.pop()}\u003e\n          \u003cText\u003epop\u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n        \u003cTouchableOpacity onPress={() =\u003e Actions.reset()}\u003e\n          \u003cText\u003ereset\u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n        \u003cTouchableOpacity onPress={() =\u003e Actions.reset(\"page2\", {})}\u003e\n          \u003cText\u003ereset to page2\u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n```\n\nThis router was inspired by [React Navigation](https://reactnavigation.org) and [RNRF](https://github.com/aksonov/react-native-router-flux).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpapillon%2Freact-native-animated-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpapillon%2Freact-native-animated-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpapillon%2Freact-native-animated-router/lists"}