{"_id":"@bam.tech/lottie-react-native","_rev":"45-14800b0df3d072627e6e8a84d4865c05","name":"@bam.tech/lottie-react-native","dist-tags":{"latest":"2.5.10"},"versions":{"2.5.9":{"name":"@bam.tech/lottie-react-native","version":"2.5.9","keywords":["lottie","animation","react","react-native","keyframe"],"author":{"name":"Leland Richardson","email":"leland.richardson@airbnb.com"},"license":"Apache-2.0","_id":"@bam.tech/lottie-react-native@2.5.9","maintainers":[{"name":"almouro","email":"alexandrem@bamlab.fr"},{"name":"amaury_liet","email":"Amaury.Liet@gmail.com"},{"name":"antoined","email":"antoined@bam.tech"},{"name":"bserrano","email":"benoits@bam.tech"},{"name":"chdeps","email":"alban.depretz@gmail.com"},{"name":"laurerc","email":"laurerc@bam.tech"},{"name":"maximes","email":"maxime.sraiki@gmail.com"},{"name":"minishlink","email":"lagrange.louis@gmail.com"},{"name":"tpucci","email":"thom0689@gmail.com"},{"name":"tychota","email":"tychot@bam.tech"},{"name":"yannl","email":"yleflour@gmail.com"}],"homepage":"https://github.com/airbnb/lottie-react-native#readme","bugs":{"url":"https://github.com/airbnb/lottie-react-native/issues"},"dist":{"shasum":"302842f8297a5aa356611cdb3c440ba8fd8b00b6","tarball":"https://registry.npmjs.org/@bam.tech/lottie-react-native/-/lottie-react-native-2.5.9.tgz","fileCount":61,"integrity":"sha512-H5o12Xj3XTTAjZR6TxlC+ZapqN/3rIrlO+OxzHGBn6gTILGmE4r9VlVmJ9WUjMPLHP+0T/sBJL+hb7SOp7X6UQ==","signatures":[{"sig":"MEUCIQCGJYB7rKOibx14gamiXduVKLAepTQlckcurfMMrfzXqAIgLLZLVVlx+/mlElK+cecFqBTkj/zo7v2FsnkeX5zHB5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8158087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtMKmCRA9TVsSAnZWagAAdLEP/i6iJ0OfylqJS1braSqh\nQpNByDzhYBLQPn91i/JDY/+ll6Xt3e6VUHMEAO4nLkBKXJMlJuGnyHqYlVwB\ndx1XLcZtzCwwqbg6yO6oKkq/ygsxiw9Oe1PxwhXInnTTW1PlP7PTKyklLLub\no+8GuEa/pEfTQSx084H5L+CdncQ/KtLE83BKfuApNSKyQfc9trJrCheOTcoS\n4nWeH+Uh/09bet3IpChi6V5ESlWu3waNsS9tEdi0eQX3lzt4FonOTKbBgJP9\nISKopBCi56HA5KPgt7GBzDSpoN3Yqde0rAxrko/gCqMbeqlfZy7fYRKpZlu4\noeH7J4CKR0jgBXbnck/ev8c3voKcMnmiDHP9OAlSUY2qCpvp8+Dy2XhyqfTL\nKBfoWnczdCJDUbduatjrPq3LaHs4VZN3pLokQGmkgjyWHPAp9au0dY+eJr0n\npOkzdnaLe0Iktk65SiSCy9m4VeRF2DuxvI8UPfNDVqzFNbLF3m/QONUhC60E\nt5YgbuLpJnZTTdVYND5ViHsQ0lRMAxvuQuR4DHzU3alj6+OXjQsaxENHSxms\ncgi52ZpXKK+o/QIbFnirirqV4syxDR7BhY30xTuHr2lUh+tufjkQLyIdPYl0\n+oJADKdM8l6Pr6OFZn2ltjfP8yNjOGPKRtkTnDli2zF4hqejwk2qKVPFVbYs\nS4I3\r\n=lkml\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","rnpm":{"android":{"sourceDir":"./src/android"}},"types":"src/js/index.d.ts","gitHead":"97a7de9b781873f2039c780a9b21afc3bfa07c16","scripts":{"ci":"npm run lint","lint":"eslint ./","test":"echo \"Error: no test specified\" && exit 1","build":"babel src/js --out-dir lib","start":"node node_modules/react-native/local-cli/cli.js start","watch":"babel src/js --out-dir lib --watch","prepare":"npm run build","run:ios":"react-native run-ios --project-path ./example/ios","build:pods":"cd example/ios; bundle exec pod install; cd -","docs:build":"npm run docs:prepare && gitbook build","docs:clean":"rimraf _book","docs:watch":"npm run docs:prepare && gitbook serve","run:android":"./gradlew installDebug && npm run start:android","docs:prepare":"gitbook install","docs:publish":"npm run docs:clean && npm run docs:build && cd _book && git init && git commit --allow-empty -m 'update book' && git fetch git@github.com:airbnb/lottie-react-native.git gh-pages && git checkout -b gh-pages && git add . && git commit -am 'update book' && git push git@github.com:airbnb/lottie-react-native.git gh-pages --force","run:packager":"node node_modules/react-native/local-cli/cli.js start","publish:maven":"./gradlew clean check uploadArchives","start:android":"adb shell am start -n com.example/.MainActivity"},"_npmUser":{"name":"tychota","email":"tychot@bam.tech"},"repository":{"url":"git+https://github.com/airbnb/lottie-react-native.git","type":"git"},"_npmVersion":"5.6.0","description":"React Native bindings for Lottie (fork to fix xCode 10 waiting for upstream to release merged PR)","directories":{},"_nodeVersion":"8.11.3","dependencies":{"invariant":"^2.2.2","lottie-ios":"^2.5.0","prop-types":"^15.5.10","react-native-safe-module":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"16.0.0","eslint":"^3.3.1","prettier":"^1.8.2","babel-cli":"^6.26.0","gitbook-cli":"^1.0.1","babel-eslint":"^6.1.2","react-native":"0.50.3","prettier-eslint":"^8.2.2","babel-preset-airbnb":"^1.1.1","eslint-plugin-react":"^6.1.2","eslint-config-airbnb":"^10.0.1","eslint-plugin-import":"^1.14.0","eslint-config-prettier":"^2.8.0","eslint-plugin-jsx-a11y":"^2.1.0","eslint-plugin-prettier":"^2.3.1","babel-preset-react-native":"^4.0.0","babel-plugin-module-resolver":"^3.0.0","eslint-plugin-prefer-object-spread":"^1.1.0","eslint-import-resolver-babel-module":"^2.2.1"},"peerDependencies":{"react":"*","react-native":">=0.46"},"_npmOperationalInternal":{"tmp":"tmp/lottie-react-native_2.5.9_1538572965687_0.15429626769792892","host":"s3://npm-registry-packages"}},"2.5.10":{"name":"@bam.tech/lottie-react-native","version":"2.5.10","keywords":["lottie","animation","react","react-native","keyframe"],"author":{"name":"Leland Richardson","email":"leland.richardson@airbnb.com"},"license":"Apache-2.0","_id":"@bam.tech/lottie-react-native@2.5.10","maintainers":[{"name":"almouro","email":"alexandrem@bamlab.fr"},{"name":"amaury_liet","email":"Amaury.Liet@gmail.com"},{"name":"antoined","email":"antoined@bam.tech"},{"name":"bserrano","email":"benoits@bam.tech"},{"name":"chdeps","email":"alban.depretz@gmail.com"},{"name":"laurerc","email":"laurerc@bam.tech"},{"name":"maximes","email":"maxime.sraiki@gmail.com"},{"name":"minishlink","email":"lagrange.louis@gmail.com"},{"name":"tpucci","email":"thom0689@gmail.com"},{"name":"tychota","email":"tychot@bam.tech"},{"name":"yannl","email":"yleflour@gmail.com"}],"homepage":"https://github.com/airbnb/lottie-react-native#readme","bugs":{"url":"https://github.com/airbnb/lottie-react-native/issues"},"dist":{"shasum":"3616526f46bf82b0df9516ec5e09d26927ca8895","tarball":"https://registry.npmjs.org/@bam.tech/lottie-react-native/-/lottie-react-native-2.5.10.tgz","fileCount":61,"integrity":"sha512-77ChUeehcHurOnrTxdb5BE5M2pnbd64sCOl0TeGntvTI7UjIjLfRsi8QyBMCqsKOw7Mo9CAz0QgNhxgmN71B+w==","signatures":[{"sig":"MEUCIBmf1DDFrKEeMK6+TwriOwO1Sf9RVsNKP1rN8E/5rvz2AiEAq2GSTb9LGZDxhMbOq9UhZ6Wai4KoG6ht1EC9Tqsuj6Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8158098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtMVnCRA9TVsSAnZWagAAFcAP/2D+bga6dE4zvt8Ybim9\netBH/Hdu5U5T1sL5uRd/caZkQ1gZ+OX+jnfUgBPK96TNHAiZZaQGtwkgy0dU\nsd9HhPJO0ftk6CBsN6YRVgB1X1JU1aAtAlVBjxilyUWWP9kCy9Mr+9x3y1h6\ntD2EhMs6GW+yORTIpGQU4f9FvlSwn1+1jH0/dXSVc76qARQ4qxIsLh02Lz+C\nzP0awdoG1jvdHnrVO/JljkTnnszYCR59crPtn5KqeNeRIr9i4PCW3A92/l7S\nSbi/X0UxdcaM3ODn/RitKGtGQb/AnysVskc0fCJbOMDNPVnBjpYiYK31D6yV\nVJFUdO0Yrn3z4+elSjbbx9ewVhLmODSwJTlonQukYaY/HHg01qHyGaHlPMQP\n+uQfoPjzPyfTgrAsCwIONtlnIppJL4/cbdJQ52bLKLXmHiOeEu9/Y/O5yWnR\nrSMkD4VkIDEcnMfS22MS7B2kqxtRMHILBiexywaiV30JyS+Un5mYJ6h7lgqD\ngXeUk4y+mOpIu4VUPgOfpLQIGcUpcIh4XLHoZ1OHo5oVRjz+o6F/w9tG0nK8\nN7oM5ZqD3AGzdTviZhrw/0w1f/wCwzpuRqHqsqKCMb6qmr4ANFwCDd6vZf8a\nl/owD3Us//aPDeB2JmaxtypaNCCiij+lzjk6FJrKCfIGNMu+MlyrpUjEmWSg\nD8gE\r\n=675y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","rnpm":{"android":{"sourceDir":"./src/android"}},"types":"src/js/index.d.ts","gitHead":"97a7de9b781873f2039c780a9b21afc3bfa07c16","scripts":{"ci":"npm run lint","lint":"eslint ./","test":"echo \"Error: no test specified\" && exit 1","build":"babel src/js --out-dir lib","start":"node node_modules/react-native/local-cli/cli.js start","watch":"babel src/js --out-dir lib --watch","prepare":"npm run build","run:ios":"react-native run-ios --project-path ./example/ios","build:pods":"cd example/ios; bundle exec pod install; cd -","docs:build":"npm run docs:prepare && gitbook build","docs:clean":"rimraf _book","docs:watch":"npm run docs:prepare && gitbook serve","run:android":"./gradlew installDebug && npm run start:android","docs:prepare":"gitbook install","docs:publish":"npm run docs:clean && npm run docs:build && cd _book && git init && git commit --allow-empty -m 'update book' && git fetch git@github.com:airbnb/lottie-react-native.git gh-pages && git checkout -b gh-pages && git add . && git commit -am 'update book' && git push git@github.com:airbnb/lottie-react-native.git gh-pages --force","run:packager":"node node_modules/react-native/local-cli/cli.js start","publish:maven":"./gradlew clean check uploadArchives","start:android":"adb shell am start -n com.example/.MainActivity"},"_npmUser":{"name":"tychota","email":"tychot@bam.tech"},"repository":{"url":"git+https://github.com/airbnb/lottie-react-native.git","type":"git"},"_npmVersion":"5.6.0","description":"React Native bindings for Lottie (fork to fix xCode 10 waiting for upstream to release merged PR)","directories":{},"_nodeVersion":"8.11.3","dependencies":{"invariant":"^2.2.2","lottie-ios":"^2.5.0","prop-types":"^15.5.10","react-native-safe-module":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"16.0.0","eslint":"^3.3.1","prettier":"^1.8.2","babel-cli":"^6.26.0","gitbook-cli":"^1.0.1","babel-eslint":"^6.1.2","react-native":"0.50.3","prettier-eslint":"^8.2.2","babel-preset-airbnb":"^1.1.1","eslint-plugin-react":"^6.1.2","eslint-config-airbnb":"^10.0.1","eslint-plugin-import":"^1.14.0","eslint-config-prettier":"^2.8.0","eslint-plugin-jsx-a11y":"^2.1.0","eslint-plugin-prettier":"^2.3.1","babel-preset-react-native":"^4.0.0","babel-plugin-module-resolver":"^3.0.0","eslint-plugin-prefer-object-spread":"^1.1.0","eslint-import-resolver-babel-module":"^2.2.1"},"peerDependencies":{"react":"*","react-native":">=0.46"},"_npmOperationalInternal":{"tmp":"tmp/lottie-react-native_2.5.10_1538573670925_0.21326339605175715","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-10-03T13:22:45.553Z","modified":"2026-04-14T19:16:30.328Z","2.5.9":"2018-10-03T13:22:46.134Z","2.5.10":"2018-10-03T13:34:31.444Z"},"bugs":{"url":"https://github.com/airbnb/lottie-react-native/issues"},"author":{"name":"Leland Richardson","email":"leland.richardson@airbnb.com"},"license":"Apache-2.0","homepage":"https://github.com/airbnb/lottie-react-native#readme","keywords":["lottie","animation","react","react-native","keyframe"],"repository":{"url":"git+https://github.com/airbnb/lottie-react-native.git","type":"git"},"description":"React Native bindings for Lottie (fork to fix xCode 10 waiting for upstream to release merged PR)","maintainers":[{"email":"tychot@bam.tech","name":"tychota"},{"email":"antoine.thibierge@theodo.com","name":"antoinethib"},{"email":"marekk@bamlab.fr","name":"marekkalnik"},{"email":"yangl@bam.tech","name":"laurence923"},{"email":"remil@bam.tech","name":"remilry"},{"email":"paulb@bam.tech","name":"p0labrd"},{"email":"alexisd@bam.tech","name":"alexisd"},{"email":"thomasre@bam.tech","name":"thomasre"},{"email":"npm@victor.pm","name":"vicprz"},{"email":"pierr.poupin@laposte.net","name":"pierpo"},{"email":"pierrez@bam.tech","name":"pierrezimmermann"},{"email":"hugok@bam.tech","name":"hugok"},{"email":"zyad.alalgui@theodo.com","name":"al.zyad"},{"email":"nicolas.descamps@theodo.com","name":"nicodeck44"},{"email":"julien.izzillo@theodo.com","name":"julienizz"},{"email":"julienc@bam.tech","name":"julienc6"},{"email":"eliott.gandiolle@theodo.com","name":"eliottgdl"}],"readme":"Lottie for React Native, [iOS](https://github.com/airbnb/lottie-ios), and [Android](https://github.com/airbnb/lottie-android)\n===\n\n[![npm Version](https://img.shields.io/npm/v/lottie-react-native.svg)](https://www.npmjs.com/package/lottie-react-native) [![License](https://img.shields.io/npm/l/lottie-react-native.svg)](https://www.npmjs.com/package/lottie-react-native) [![Build Status](https://travis-ci.org/airbnb/lottie-react-native.svg)](https://travis-ci.org/airbnb/lottie-react-native)\n\nLottie component for React Native (iOS and Android)\n\nLottie is a mobile library for Android and iOS that parses [Adobe After Effects](http://www.adobe.com/products/aftereffects.html) animations exported as JSON with [bodymovin](https://github.com/bodymovin/bodymovin) and renders them natively on mobile!\n\nFor the first time, designers can create **and ship** beautiful animations without an engineer painstakingly recreating it by hand.\n\n# Getting Started\n\nGet started with Lottie by installing the node module with yarn or npm:\n\n```\nyarn add lottie-react-native\n```\nor\n```\nnpm i --save lottie-react-native\n```\n\n## iOS\n\nUse `react-native link` to add the library to your project:\n\n```\nreact-native link lottie-ios\nreact-native link lottie-react-native\n```\n\nAfter this, open the Xcode project configuration and add the `Lottie.framework` as `Embedded Binaries`.\n\n## Android\n\nFor android, you can `react-native link` as well:\n\n```\nreact-native link lottie-react-native\n```\n\n# Usage\n\nLottieView can be used in a declarative way:\n\n```jsx\nimport React from 'react';\nimport LottieView from 'lottie-react-native';\n\nexport default class BasicExample extends React.Component {\n  render() {\n    return (\n      <LottieView\n        source={require('./animation.json')}\n        autoPlay\n        loop\n      />\n    );\n  }\n}\n```\n\nAdditionally, there is an imperative API which is sometimes simpler.\n\n```jsx\nimport React from 'react';\nimport LottieView from 'lottie-react-native';\n\nexport default class BasicExample extends React.Component {\n  componentDidMount() {\n    this.animation.play();\n    // Or set a specific startFrame and endFrame with:\n    this.animation.play(30, 120);\n  }\n\n  render() {\n    return (\n      <LottieView\n        ref={animation => {\n          this.animation = animation;\n        }}\n        source={require('../path/to/animation.json')}\n      />\n    );\n  }\n}\n```\n\nLottie's animation progress can be controlled with an `Animated` value:\n\n```jsx\nimport React from 'react';\nimport { Animated, Easing } from 'react-native';\nimport LottieView from 'lottie-react-native';\n\nexport default class BasicExample extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      progress: new Animated.Value(0),\n    };\n  }\n\n  componentDidMount() {\n    Animated.timing(this.state.progress, {\n      toValue: 1,\n      duration: 5000,\n      easing: Easing.linear,\n    }).start();\n  }\n\n  render() {\n    return (\n      <LottieView source={require('../path/to/animation.json')} progress={this.state.progress} />\n    );\n  }\n}\n```\n\n## API\nYou can find The full list of props and methods available in our [API document](https://github.com/airbnb/lottie-react-native/blob/master/docs/api.md). These are the most commont ones:\n\n| Prop | Description | Default |\n|---|---|---|\n|**`source`**| **Mandatory** - The source of animation. This must be a JS object of an animation, obtained (for example) with something like `require('../path/to/animation.json')`. This is needed in order to fix things. | *None* |\n|**`style`**| Style attributes for the view, as expected in a standard [`View`](https://facebook.github.io/react-native/docs/layout-props.html). | The `aspectRatio` exported by Bodymovin will be set. Also the `width` if you haven't provided a `width` or `height` |\n|**`loop`**| A boolean flag indicating whether or not the animation should loop. | `false` |\n|**`autoPlay`**| A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. | `false` |\n\n[More...](https://github.com/airbnb/lottie-react-native/blob/master/docs/api.md)\n\n# More\n\nView more documentation, FAQ, help, examples, and more at [airbnb.io/lottie](http://airbnb.io/lottie/react-native/react-native.html)\n\n![Example1](docs/gifs/Example1.gif)\n\n\n![Example2](docs/gifs/Example2.gif)\n\n\n![Example3](docs/gifs/Example3.gif)\n\n\n![Community](docs/gifs/Community%202_3.gif)\n\n\n![Example4](docs/gifs/Example4.gif)\n","readmeFilename":"README.md"}