{"id":4322,"url":"https://github.com/ericpkerr/react-native-animated-styles","last_synced_at":"2025-04-14T14:31:05.839Z","repository":{"id":25212926,"uuid":"103448221","full_name":"EricPKerr/react-native-animated-styles","owner":"EricPKerr","description":"Easily animate react-native components between two styles.","archived":true,"fork":false,"pushed_at":"2023-03-04T02:35:50.000Z","size":1454,"stargazers_count":24,"open_issues_count":11,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-22T18:11:14.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/EricPKerr.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,"roadmap":null,"authors":null}},"created_at":"2017-09-13T20:40:59.000Z","updated_at":"2025-01-24T21:22:09.000Z","dependencies_parsed_at":"2024-01-08T01:02:44.164Z","dependency_job_id":"2c848408-499b-49e8-adc1-898fafab0501","html_url":"https://github.com/EricPKerr/react-native-animated-styles","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricPKerr%2Freact-native-animated-styles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricPKerr%2Freact-native-animated-styles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricPKerr%2Freact-native-animated-styles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricPKerr%2Freact-native-animated-styles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EricPKerr","download_url":"https://codeload.github.com/EricPKerr/react-native-animated-styles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248897073,"owners_count":21179533,"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-01-05T20:17:08.219Z","updated_at":"2025-04-14T14:31:05.521Z","avatar_url":"https://github.com/EricPKerr.png","language":"JavaScript","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"# react-native-animated-styles\n\nEasily animate react-native components between two styles.  Similar concept to adding and removing a CSS class to animate HTML Elements for the web.\n\n# Install\n\n`npm install --save react-native-animated-styles`\n\n# Properties\n\n```\n\u003cAnimatedStyles.View/Text/Image\n  style={}           // Default Element Style\n  animatedStyle={}   // Animated Element Style (what the element animates to)\n  active={}          // Whether the animated state is active\n  duration={}        // Animation Duration\n  animateInitial={}  // Whether component should initially animate if it's currently active\n  useNativeDriver={} // Use native driver for performance\n/\u003e\n```\n\n# Example Usage\n\n```\nimport AnimatedStyles from 'react-native-animated-styles';\nimport { useEffect, useState } from 'react';\n\nconst MyComponent = () =\u003e {\n  const [ active, setActive ] = useState(true);\n\n  useEffect(() =\u003e {\n    setInterval(() =\u003e {\n      setActive((active) =\u003e !active);\n    }, 3000);\n  }, []);\n\n  return (\n    \u003cView style={styles.wrap}\u003e\n      \u003cAnimatedStyles.View\n        style={styles.box}\n        animatedStyle={styles.boxActive}\n        active={active}\n      /\u003e\n    \u003c/View\u003e\n  )\n};\n\nconst styles = StyleSheet.create({\n  wrap: {\n    flex: 1,\n    alignItems: 'center',\n    justifyContent: 'center'\n  },\n\n  box: {\n    backgroundColor: 'rgb(73, 0, 9)', // normalizes colors\n    width: 80,\n    height: 80\n  },\n\n  boxActive: {\n    width: 100,\n    height: 100,\n    backgroundColor: '#AC0E28',\n    transform: [\n      { rotate: '45deg' } // uses default values for transform properties\n    ]\n  }\n});\n```\n\n![Example](https://github.com/EricPKerr/react-native-animated-styles/blob/master/Example.gif?raw=true)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericpkerr%2Freact-native-animated-styles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericpkerr%2Freact-native-animated-styles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericpkerr%2Freact-native-animated-styles/lists"}