{"id":19502871,"url":"https://github.com/phamfoo/react-native-easing-keyframes","last_synced_at":"2025-11-19T02:03:46.645Z","repository":{"id":49669347,"uuid":"238830301","full_name":"phamfoo/react-native-easing-keyframes","owner":"phamfoo","description":"Create CSS keyframe-based animations in React Native","archived":false,"fork":false,"pushed_at":"2021-06-11T04:14:46.000Z","size":1421,"stargazers_count":3,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-17T20:50:42.133Z","etag":null,"topics":["animations","keyframes","react-native"],"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/phamfoo.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":"2020-02-07T02:48:14.000Z","updated_at":"2023-03-14T23:10:22.000Z","dependencies_parsed_at":"2022-09-17T00:01:41.003Z","dependency_job_id":null,"html_url":"https://github.com/phamfoo/react-native-easing-keyframes","commit_stats":null,"previous_names":["tienph6m/react-native-easing-keyframes"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/phamfoo/react-native-easing-keyframes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamfoo%2Freact-native-easing-keyframes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamfoo%2Freact-native-easing-keyframes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamfoo%2Freact-native-easing-keyframes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamfoo%2Freact-native-easing-keyframes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phamfoo","download_url":"https://codeload.github.com/phamfoo/react-native-easing-keyframes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phamfoo%2Freact-native-easing-keyframes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285170106,"owners_count":27126456,"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","status":"online","status_checked_at":"2025-11-19T02:00:05.673Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","keyframes","react-native"],"created_at":"2024-11-10T22:18:42.791Z","updated_at":"2025-11-19T02:03:46.617Z","avatar_url":"https://github.com/phamfoo.png","language":"TypeScript","readme":"# React Native Easing Keyframes\n\n[![Stable Release](https://img.shields.io/npm/v/react-native-easing-keyframes.svg)](https://npm.im/react-native-easing-keyframes) [![license](https://badgen.now.sh/badge/license/MIT)](./LICENSE)\n\nCreate CSS keyframe-based animations in React Native\n\n## Installation\n\n```sh\nyarn add react-native-easing-keyframes\n```\n\nor\n\n```sh\nnpm install react-native-easing-keyframes\n```\n\n## Why do I need this?\n\nUsually in [timing](https://facebook.github.io/react-native/docs/animated#timing) animations, the easing function is applied to the entire duration of the animation. With the `keyframes` helper from this library, you can control what easing function to use in each keyframe during the animation.\n\n```js\nimport keyframes from 'react-native-easing-keyframes'\n\nconst easeInOut = Easing.bezier(0.42, 0.0, 0.58, 1.0)\n\nconst value = new Animated.Value(0)\nAnimated.timing(value, {\n  duration: 1200,\n  toValue: 100,\n  easing: keyframes({ easing: easeInOut, keyframes: [0, 50, 100] }),\n  useNativeDriver: true,\n})\n```\n\nIn the example above, `keyframes` will apply the easing function you want to use (`easeInOut`) to each keyframe, so `easeInOut` will be applied twice, from 0 to 50 and from 50 to 100.\n\nYou can also target a specific keyframe and apply a different easing function to it.\n\n```js\nAnimated.timing(value, {\n  duration: 1200,\n  toValue: 100,\n  easing: keyframes({\n    easing: easeInOut,\n    keyframes: [0, 50, 100],\n    easingsByKeyframe: { 50: Easing.linear },\n  }),\n  useNativeDriver: true,\n})\n```\n\n## API\n\n### keyframes\n\n\u003e `(config: Config) =\u003e EasingFunction`\n\nThis function applies an easing function to each keyframe based on a config.\n\n### Config\n\nAn object that contains:\n\n#### keyframes\n\n\u003e `number[]`\n\nAnd array of keyframes used in the animation.\n\nThis array must have at least 3 items. If you're animating from `0` to `100` then the first one should be `0` and the last one should be `100`.\n\n#### easing\n\n\u003e `(value: number) =\u003e number` | default to Easing.inOut(Easing.ease)\n\nThe default easing function that will be used in all keyframes.\n\n#### easingsByKeyframe\n\n\u003e `{ [key: number]: EasingFunction }` | defaults to {}\n\nYou can specify the easing function you want to use for an individual keyframe. If no `easing function` is specified, the value from `easing` will be used.\n\n## Example\n\nTo run the example project, follow these steps:\n\n- Clone the repo\n- Run these commands\n\n```sh\nyarn\ncd example\nyarn \u0026\u0026 yarn start\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphamfoo%2Freact-native-easing-keyframes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphamfoo%2Freact-native-easing-keyframes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphamfoo%2Freact-native-easing-keyframes/lists"}