{"id":19710474,"url":"https://github.com/rootstrap/react-native-use-animate","last_synced_at":"2025-05-12T14:57:05.837Z","repository":{"id":38875244,"uuid":"271573415","full_name":"rootstrap/react-native-use-animate","owner":"rootstrap","description":"Animations in React native made simple","archived":false,"fork":false,"pushed_at":"2024-10-31T15:17:39.000Z","size":373,"stargazers_count":41,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-24T08:21:03.305Z","etag":null,"topics":["animations","react-native"],"latest_commit_sha":null,"homepage":"https://rootstrap.com","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/rootstrap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-11T14:52:01.000Z","updated_at":"2024-04-06T04:10:18.000Z","dependencies_parsed_at":"2024-11-11T22:17:32.829Z","dependency_job_id":null,"html_url":"https://github.com/rootstrap/react-native-use-animate","commit_stats":{"total_commits":55,"total_committers":5,"mean_commits":11.0,"dds":0.6727272727272727,"last_synced_commit":"be03b628019531dc27866956b073a5b942f6271a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Freact-native-use-animate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Freact-native-use-animate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Freact-native-use-animate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Freact-native-use-animate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/react-native-use-animate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253760096,"owners_count":21959878,"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"],"created_at":"2024-11-11T22:07:29.472Z","updated_at":"2025-05-12T14:57:05.800Z","avatar_url":"https://github.com/rootstrap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @rootstrap/react-native-use-animate\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/a878b4be647cd2a9582c/maintainability)](https://codeclimate.com/github/rootstrap/react-native-use-animate/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/a878b4be647cd2a9582c/test_coverage)](https://codeclimate.com/github/rootstrap/react-native-use-animate/test_coverage)\n\nReact Native animations made simple.\n\nWhether you are looking to get started with animations in React Native or you need to add a simple animation to your app and are looking for a simple and light weight option, this is the library for you.\n\nThis library contains some simple animation hooks that will cover simple use cases and some complex ones as well.\n\n## Demo\n\n![demo-animation](https://user-images.githubusercontent.com/9297073/84530954-269ded00-acba-11ea-94f2-5edca89faa1d.gif)\n\nTo test it out yourself you can clone this repo and go into the `demo` folder, then run `expo start` and open the app on a simulator or device.\n\n#### Just for android\n\nSince the demo is an expo project, we also have the app published on Expo. All you have to do is download the [expo client app](https://expo.io/tools#client) and scan the following QR code:\n\n![](https://user-images.githubusercontent.com/9297073/84525964-e1c28800-acb2-11ea-9396-bc2d107d4711.png)\n\nThis is only available for Android since Apple has restrictions on how apps can be published.\n\n## Installation\n\n```\nyarn add @rootstrap/react-native-use-animate\n```\n\n```\nnpm install @rootstrap/react-native-use-animate --save\n```\n\nAnd that's it! No linking needed no matter which version of react-native you are running.\n\n## Usage\n\n### Simple Animation\n\n\u003c!-- TODO: add gif --\u003e\n\n```js\nimport React from 'react';\nimport { Animated, StyleSheet } from 'react-native';\nimport { useAnimate } from '@rootstrap/react-native-use-animate';\n\nconst styles = StyleSheet.create({\n  box: {\n    width: 100,\n    height: 100,\n    backgroundColor: 'red',\n  },\n});\n\nconst AnimatedBox = () =\u003e {\n  const animatedX = useAnimate({\n    fromValue: 0,\n    toValue: 100,\n    duration: 1000,\n    iterations: -1,\n    bounce: true,\n  });\n\n  return (\n    \u003cAnimated.View style={[styles.box, { left: animatedX.animatedValue }]} /\u003e\n  );\n};\n```\n\n### Parallel Animations\n\n\u003c!-- TODO: add gif --\u003e\n\n```js\nimport React from 'react';\nimport { Animated, StyleSheet } from 'react-native';\nimport {\n  useAnimate,\n  useAnimateParallel,\n} from '@rootstrap/react-native-use-animate';\n\nconst styles = StyleSheet.create({\n  box: {\n    width: 100,\n    height: 100,\n    backgroundColor: 'red',\n  },\n});\n\nconst AnimatedBox = () =\u003e {\n  const animatedOpacity = useAnimate({\n    animate: false,\n    bounce: true,\n  });\n\n  const animatedRotation = useAnimate({\n    bounce: true,\n    animate: false,\n  });\n\n  useAnimateParallel({\n    animations: [animatedOpacity, animatedRotation],\n    iterations: -1,\n    duration: 1000,\n  });\n\n  return (\n    \u003cAnimated.View\n      style={[\n        styles.box,\n        {\n          opacity: animatedOpacity.animatedValue,\n          transform: [\n            {\n              rotate: animatedRotation.interpolate({\n                outputRange: ['0deg', '360deg'],\n              }),\n            },\n          ],\n        },\n      ]}\n    /\u003e\n  );\n};\n```\n\n### Sequenced Animations\n\n\u003c!-- TODO: add gif --\u003e\n\n```js\nimport React from 'react';\nimport { Animated, StyleSheet } from 'react-native';\nimport {\n  useAnimate,\n  useAnimateSequence,\n} from '@rootstrap/react-native-use-animate';\n\nconst styles = StyleSheet.create({\n  box: {\n    width: 100,\n    height: 100,\n    backgroundColor: 'red',\n  },\n});\n\nconst AnimatedBox = () =\u003e {\n  const animatedX = useAnimate({\n    fromValue: 0,\n    toValue: 200,\n    animate: false,\n  });\n\n  const animatedY = useAnimate({\n    fromValue: 0,\n    toValue: 200,\n    bounce: true,\n    animate: false,\n  });\n\n  useAnimateSequence({\n    animations: [animatedX, animatedY],\n    iterations: -1,\n    duration: 1000,\n  });\n\n  return (\n    \u003cAnimated.View\n      style={[\n        styles.box,\n        {\n          left: animatedX.animatedValue,\n          top: animatedY.animatedValue,\n        },\n      ]}\n    /\u003e\n  );\n};\n```\n\n## Contributing\n\nIf you have an idea that could make this library better we would love to hear it. Please take a look at our [Contributing Guidelines](CONTRIBUTING.md) to get to know the rules and how to get started with your contribution.\n\n## License\n\n**@rootstrap/react-native-use-animate** is available under the MIT license. See the LICENSE file for more info.\n\n## Credits\n\n**@rootstrap/react-native-use-animate** is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our [contributors](https://github.com/rootstrap/react-native-use-animate/contributors).\n\n[\u003cimg src=\"https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png\" width=\"100\"/\u003e](http://www.rootstrap.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Freact-native-use-animate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Freact-native-use-animate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Freact-native-use-animate/lists"}