React Native

Get started with Lottie by installing the node module with yarn or npm:

yarn add lottie-react-native@{{ book.reactNativeVersion }}
# or
npm i --save lottie-react-native@{{ book.reactNativeVersion }}

iOS

If you're using CocoaPods on iOS, you can put the following in your Podfile:

pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

If you're not using CocoaPods on iOS, you can use react-native link:

react-native link lottie-ios
react-native link lottie-react-native

After this, open the Xcode project configuration and add the Lottie.framework as Embedded Binaries.

Android

For android, you can react-native link as well:

react-native link lottie-react-native

or you can add it manually:

settings.gradle:

build.gradle:

Lottie requires Android support library version 26. If you're using the react-native init template, you may still be using 23. To change this, simply go to android/app/build.gradle and find the compileSdkVersion option inside of the android block and change it to

You must also add the LottiePackage to getPackages() in your ReactApplication

Then, go to android/build.gradle and make sure it has :

With this change you should be ready to go.

Lottie's animation progress can be controlled with an Animated value:

Additionally, there is an imperative API which is sometimes simpler.

Last updated