{"id":15175326,"url":"https://github.com/portons/react-native-anime","last_synced_at":"2025-10-01T12:31:15.642Z","repository":{"id":57335370,"uuid":"90001320","full_name":"portons/react-native-anime","owner":"portons","description":"React Native animation utility","archived":true,"fork":false,"pushed_at":"2017-08-17T08:19:31.000Z","size":162,"stargazers_count":73,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-19T05:19:48.801Z","etag":null,"topics":["animation","native","react","react-native","reactjs"],"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/portons.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}},"created_at":"2017-05-02T06:54:28.000Z","updated_at":"2023-01-28T18:54:06.000Z","dependencies_parsed_at":"2022-09-14T15:21:03.830Z","dependency_job_id":null,"html_url":"https://github.com/portons/react-native-anime","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/portons%2Freact-native-anime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portons%2Freact-native-anime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portons%2Freact-native-anime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portons%2Freact-native-anime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/portons","download_url":"https://codeload.github.com/portons/react-native-anime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219866620,"owners_count":16554249,"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","native","react","react-native","reactjs"],"created_at":"2024-09-27T12:22:48.990Z","updated_at":"2025-10-01T12:31:10.261Z","avatar_url":"https://github.com/portons.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Anime\n(Inspired by Cheetah for Swift: https://github.com/suguru/Cheetah)\n\nAnime is an animation utility for React Native. It's built on top of the [Animated module](https://facebook.github.io/react-native/docs/animated.html), and provides a much simpler API for handling animations.\n\nThe library is still in early development. I also need to add a proper API documentation. Open issues if you find any bugs, and contributions are also welcomed!\n\n# Features\n* Animations with durations and delays\n* Parallel/Serial executions\n* Easings\n* Springs\n\n# Installation\n```javascript\n$ yarn add react-native-anime\n```\n\n# Local Development\n\n\u003e Taken from [`victory-native`](https://github.com/FormidableLabs/victory-native#local-development), you should check this project, it's awesome.\n\nIf you'd like to contribute to victory-native, you can use the local demo app to test your changes on the iOS simulator. (But if you're just getting started with victory-native and want to see a demo, we recommend using victory-native-demo, as it supports Android and is simpler to set up.)\n```sh\n# Install\n$ yarn global add react-native-cli # if you haven't already\n$ git clone https://github.com/FormidableLabs/victory-native\n$ cd victory-native\n$ yarn\n\n# Start the react-native packager in a terminal that will remain running\n$ yarn start\n\n# Run the demo from a new terminal window\n$ yarn demo:ios\n```\nChanges to ``src` will be reflected in the demo app.\n\nDo not run `yarn` in the demo/ directory, or the packager packager will crash due to \"duplicate @providesModule declarations\" found in node_modules/ and demo/node_modules.\n\n# Code Example\n1. Import Anime\n\n```javascript\nimport Anime from 'react-native-anime';\n```\n\n2. Wrap your view with Anime component and save its reference\n```javascript\nrender () {\n    return (\n        \u003cAnime.View ref={ ref =\u003e this.box = ref }\u003e\n            \u003cView style={ styles.box }/\u003e\n        \u003c/Anime.View\u003e\n    )\n}\n```\n\n3. Use the reference to animate your component\n```javascript\nonClick() {\n    this.box.moveX(100, { duration: 1500 }).start();\n}\n\n// You can also stop an animation with a .stop() method, and reset the component's styling with .reset()\nstopAndReset() {\n    this.box.stop();\n    this.box.reset();\n}\n```\n\n![simple-move](https://zippy.gfycat.com/DistantCluelessCowrie.gif)\n\n# Available methods\n\nTranslate:\n```\ntranslateX\ntranslateY\nmoveX // Relative to last X translation\nmoveY // Relative to last Y translation\n```\n\nSkew:\n```\nskewX\nskewY\n```\n\nPrespective:\n```\nperspective\n```\n\nScale:\n```\nscale\n```\n\nRotate:\n```\nrotateZ OR rotate\nrotateX\nrotateY\n```\n\nBorders:\n```\nborderRadius\nborderWidth\nborderColor\n```\n\nText:\n```\nfontSize\ncolor\n```\n\nLayout:\n```\nheight\nwidth\nopacity\nbackgroundColor\nzIndex\n```\n# Parallel execution\nAnime groups animation properties and executes them at once.\n\n```javascript\n    this.box\n        .moveX(50)\n        .moveY(50)\n        .rotate(180)\n        .start()\n```\n\n![parallel](https://zippy.gfycat.com/SecondGlitteringGannet.gif)\n\n# Sequence execution\n`wait` will wait until all animations placed before it completed. It can also receive milliseconds to wait to start next animation\n\n```javascript\n    this.box\n        // first animation\n        .moveX(50)\n        .scale(1.5)\n        // wait 1s before starting second animation\n        .wait(1000)\n        // second animation\n        .moveX(-50)\n        .scale(0.5)\n        .start()\n```\n\n![sequence](https://zippy.gfycat.com/IlliterateFreeArchaeocete.gif)\n\n# Duration, delay, [easing](https://github.com/facebook/react-native/blob/master/Libraries/Animated/src/Easing.js)\nJust like with Animated, you can specify durations, delays and easings for your animations\n\n```javascript\n    import { Easing } from 'react-native';\n\n    animate() {\n        this.box\n            .skewX(50, { duration: 2000, easing: Easing.bounce })\n            .rotateY(-100, { delay: 2000 })\n            .start();\n    }\n```\n\n![duration](https://zippy.gfycat.com/JauntySmartIrukandjijellyfish.gif)\n\n# Spring\nYou can also use Animated's spring animations, together with all its options (http://browniefed.com/react-native-animation-book/api/SPRING.html)\n\n```javascript\n    this.box\n        .height(100, { spring: { friction: 1, velocity: 100 } })\n        .borderRadius(100)\n        .start()\n\n    // or simply use `spring: true` for default spring behaviour\n    this.box\n        .moveX(50, { spring: true })\n        .start()\n```\n\n![spring](https://zippy.gfycat.com/HonoredWastefulBeaver.gif)\n\n# Also supports Image, Text and ScrollView\nLike with Animated module, you can also animate Text, Image and ScrollView components\n\n```javascript\n    render() {\n        return (\n            \u003cAnime.Image ref={ ref =\u003e this.image = ref }\n                         source={{ require('pikachu.gif') }} /\u003e\n        )\n    }\n\n    animate() {\n        this.image\n            .skewX(5, { spring: true })\n            .skewY(5, { spring: true })\n            .wait()\n            .rotate(360*20, { duration: 2000 })\n            .start()\n    }\n```\n\n![image](https://thumbs.gfycat.com/LawfulSpiritedCornsnake-size_restricted.gif)\n\n# Parallel animation of numerous components\n\n```javascript\n    render() {\n        return (\n            \u003cView\u003e\n            \t\u003cAnime.View ref={ ref =\u003e this.box = ref }\n            \t\t    style={{ width: 50, height: 50, backgroundColor: 'blue' }}/\u003e\n\n            \t\u003cAnime.Text ref={ ref =\u003e this.text = ref }\n            \t\t    style={{ color: 'blue', fontSize: 12 }}\u003e\n            \t\tVery easy\n            \t\u003c/Anime.Text\u003e\n            \u003c/View\u003e\n        )\n    }\n\n    animateComponents() {\n        const box = this.box.rotate(90);\n        const text = this.text.color('red');\n\n        const parallel = new Anime.Parallel([box, text]);\n\n        // Start parallel animation for both components, and reset them both when it ends\n        parallel.start(() =\u003e parallel.reset())\n    }\n```\n\n![numerous](https://zippy.gfycat.com/SlimyTinyFiddlercrab.gif)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportons%2Freact-native-anime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fportons%2Freact-native-anime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportons%2Freact-native-anime/lists"}