{"id":13508358,"url":"https://github.com/chenqingspring/react-lottie","last_synced_at":"2025-05-12T15:29:17.860Z","repository":{"id":37431657,"uuid":"88962332","full_name":"chenqingspring/react-lottie","owner":"chenqingspring","description":"Render After Effects animations on React based on lottie-web","archived":false,"fork":false,"pushed_at":"2025-04-22T01:00:04.000Z","size":1077,"stargazers_count":1714,"open_issues_count":100,"forks_count":360,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-06T03:40:04.979Z","etag":null,"topics":["after-effects","bodymovin","lottie-animation","lottie-web","react","react-component"],"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/chenqingspring.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"react-lottie","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2017-04-21T08:42:23.000Z","updated_at":"2025-05-02T07:55:09.000Z","dependencies_parsed_at":"2024-06-18T11:09:47.814Z","dependency_job_id":"60ff785b-8a39-4354-b5c4-fd597302f81f","html_url":"https://github.com/chenqingspring/react-lottie","commit_stats":{"total_commits":139,"total_committers":26,"mean_commits":5.346153846153846,"dds":0.525179856115108,"last_synced_commit":"0c9e4d3e922ead31242c303e8a56185385fe9d1e"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenqingspring%2Freact-lottie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenqingspring%2Freact-lottie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenqingspring%2Freact-lottie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenqingspring%2Freact-lottie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenqingspring","download_url":"https://codeload.github.com/chenqingspring/react-lottie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253765454,"owners_count":21960731,"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":["after-effects","bodymovin","lottie-animation","lottie-web","react","react-component"],"created_at":"2024-08-01T02:00:51.963Z","updated_at":"2025-05-12T15:29:17.805Z","avatar_url":"https://github.com/chenqingspring.png","language":"JavaScript","funding_links":["https://opencollective.com/react-lottie"],"categories":["JavaScript","Animated Icon Libraries"],"sub_categories":[],"readme":"# Lottie Animation View for React ([Angular](https://github.com/chenqingspring/ng-lottie), [Vue](https://github.com/chenqingspring/vue-lottie))\n\n[![npm version](https://badge.fury.io/js/react-lottie.svg)](http://badge.fury.io/js/react-lottie)\n\n## Demos\n- [Full Demo - Try in your code editor](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleLikeControl\u0026libCreator=tanstack\u0026userId=abc123)\n- [Toggle like - Demo in your code editor](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleLike\u0026libCreator=tanstack\u0026userId=abc123)\n- [Transition \u0026 loops - Demo in your code editor](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleTransitionsLoops\u0026libCreator=tanstack\u0026userId=abc123)\n- [Transitions with options - Demo in your code editor](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleTransitionsOptions\u0026libCreator=tanstack\u0026userId=abc123)\n- [Wtih segments - Demo in your code editor](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleSegment\u0026libCreator=tanstack\u0026userId=abc123)\n\n## Wapper of bodymovin.js\n\n[bodymovin](https://github.com/bodymovin/bodymovin) is [Adobe After Effects](http://www.adobe.com/products/aftereffects.html) plugin for exporting animations as JSON, also it provide bodymovin.js for render them as svg/canvas/html.\n\n## Why Lottie?\n\n#### Flexible After Effects features\nWe currently support solids, shape layers, masks, alpha mattes, trim paths, and dash patterns. And we’ll be adding new features on a regular basis.\n\n#### Manipulate your animation any way you like\nYou can go forward, backward, and most importantly you can program your animation to respond to any interaction.\n\n#### Small file sizes\nBundle vector animations within your app without having to worry about multiple dimensions or large file sizes. Alternatively, you can decouple animation files from your app’s code entirely by loading them from a JSON API.\n\n[Learn more](http://airbnb.design/introducing-lottie/) › http://airbnb.design/lottie/\n\nLooking for lottie files › https://www.lottiefiles.com/\n\n## Installation\n\nInstall through npm:\n```\nnpm install --save react-lottie\n```\n\n## Usage\n[Click here for demo](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleLikeControl\u0026libCreator=tanstack\u0026userId=abc123)\nImport pinjump.json as animation data\n\n```jsx\nimport React from 'react'\nimport Lottie from 'react-lottie';\nimport * as animationData from './pinjump.json'\n\nexport default class LottieControl extends React.Component {\n\n  constructor(props) {\n    super(props);\n    this.state = {isStopped: false, isPaused: false};\n  }\n\n  render() {\n    const buttonStyle = {\n      display: 'block',\n      margin: '10px auto'\n    };\n\n    const defaultOptions = {\n      loop: true,\n      autoplay: true, \n      animationData: animationData,\n      rendererSettings: {\n        preserveAspectRatio: 'xMidYMid slice'\n      }\n    };\n\n    return \u003cdiv\u003e\n      \u003cLottie options={defaultOptions}\n              height={400}\n              width={400}\n              isStopped={this.state.isStopped}\n              isPaused={this.state.isPaused}/\u003e\n      \u003cbutton style={buttonStyle} onClick={() =\u003e this.setState({isStopped: true})}\u003estop\u003c/button\u003e\n      \u003cbutton style={buttonStyle} onClick={() =\u003e this.setState({isStopped: false})}\u003eplay\u003c/button\u003e\n      \u003cbutton style={buttonStyle} onClick={() =\u003e this.setState({isPaused: !this.state.isPaused})}\u003epause\u003c/button\u003e\n    \u003c/div\u003e\n  }\n}\n\n```\n\n### props\nThe `\u003cLottie /\u003e` Component supports the following components:\n\n**options** *required*\n\nthe object representing the animation settings that will be instantiated by bodymovin. Currently a subset of the bodymovin options are supported:\n\n\u003e**loop** *options* [default: `false`]\n\u003e\n\u003e**autoplay** *options* [default: `false`]\n\u003e\n\u003e**animationData** *required*\n\u003e\n\u003e**rendererSettings** *required* \n\n**width** *optional* [default: `100%`] - [Demo](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleLikeWidthHeight\u0026libCreator=tanstack\u0026userId=abc123)\n\npixel value for containers width.\n\n**height** *optional* [default: `100%`] - [Demo](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=ToggleLikeWidthHeight\u0026libCreator=tanstack\u0026userId=abc123)\n\npixel value for containers height.\n\n**eventListeners** *optional* [default: `[]`] - [Demo](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=LottieEventListeners\u0026libCreator=tanstack\u0026userId=abc123)\n\nThis is an array of objects containing a `eventName` and `callback` function that will be registered as  eventlisteners on the animation object. refer to [bodymovin#events](https://github.com/bodymovin/bodymovin#events) where the mention using addEventListener, for a list of available custom events.\n\nexample:\n```jsx\neventListeners=[\n  {\n    eventName: 'complete',\n    callback: () =\u003e console.log('the animation completed:'),\n  },\n]\n```\n\n**isClickToPauseDisabled** *optional* [default: `false`] - [Demo](http://www.jinno.app/redirect?from=chenqingspring\u0026redirect=libary\u0026libName=react-lottie\u0026componentName=LottieClickToPause\u0026libCreator=tanstack\u0026userId=abc123)\nWhen this props is left unspecified or is set to `false` animations are paused or resumed when a user clicks or taps them. If you do not want this behaviour set this prop to `true`.\n\n## Related Projects\n\n* [Bodymovin](https://github.com/bodymovin/bodymovin) react-lottie is a wrapper of bodymovin\n* [Angular Lottie](https://github.com/chenqingspring/ng-lottie) angular implementation\n* [Vue Lottie](https://github.com/chenqingspring/vue-lottie) vue implementation\n* [React Native Lottie](https://github.com/airbnb/lottie-react-native) react native implementation by airbnb\n* [IOS Lottie](https://github.com/airbnb/lottie-ios) ios implementation by airbnb\n* [Android Lottie](https://github.com/airbnb/lottie-android) android implementation by airbnb\n\n## Contribution\nYour contributions and suggestions are heartily welcome.\n\n## License\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenqingspring%2Freact-lottie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenqingspring%2Freact-lottie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenqingspring%2Freact-lottie/lists"}