lottie-react-native /lottie-react-native

Lottie wrapper for React Native.

★ 17,215⑂ 1,795👁 216⑃ 554● 913▤ 60
TypeScriptApache-2.0Created 2017-01-27airbnb.io/lottie/#/react-native
Download: Release 7.5.1Release-7.5.1 ↓7.5.12026-11-13
+0
Daily
17,215
stars
1,795
forks
216
watchers
554
prs
913
issues
60
releases

README

Lottie React Native

 

Lottie component for React Native (iOS, Android, and Windows)

Lottie is an ecosystem of libraries for parsing Adobe After Effects animations exported as JSON with bodymovin and rendering them natively!

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand.

 Installing

 Breaking Changes in v6!

We've made some significant updates in version 6 that may impact your current setup. To get all the details about these changes, check out the migration guide.

Stay informed to ensure a seamless transition to the latest version. Thank you!

 iOS and Android

Requires React Native 0.84 or newer and the New Architecture. For older React
Native versions, use lottie-react-native 7.3.x.

- Install lottie-react-native (latest):


yarn add lottie-react-native


Go to your ios folder and run:


pod install


 Web

- Install lottie-react-native (latest):


yarn add lottie-react-native


- Add dependencies for web players:


yarn add @lottiefiles/dotlottie-react


 Windows (React Native = 0.63)


Install the lottie-react-native npm package. (Click to expand)

    
Add the following to the end of your project file. For C apps, this should come after any Microsoft.Windows.UI.Xaml.CSharp.targets includes. For C++ apps, it should come after any Microsoft.Cpp.targets includes.
xml

    $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\lottie-react-native\package.json'))\node_modules\lottie-react-native


    



Add the LottieReactNative.vcxproj file to your Visual Studio solution to ensure it takes part in the build.

For C apps, you'll need to install the following packages through NuGet:

- LottieGen.MsBuild
- Microsoft.UI.Xaml
- Win2D.uwp
- Microsoft.Toolkit.Uwp.UI.Lottie
  - This package is used for loading JSON dynamically. If you only need codegen animation, you can set false in your project file and omit this reference.

For C++ apps, you'll need these NuGet packages:

- LottieGen.MsBuild
- Microsoft.UI.Xaml

WinUI 2.6 (Microsoft.UI.Xaml 2.6.0) is required by default. Overriding this requires creating a Directory.Build.props file in your project root with a  property.

In your application code where you set up your React Native Windows PackageProviders list, add the LottieReactNative provider:

csharp
// C
PackageProviders.Add(new LottieReactNative.ReactPackageProvider(new AnimatedVisuals.LottieCodegenSourceProvider()));


cpp
// C++
include 
include 

...

PackageProviders().Append(winrt::LottieReactNative::ReactPackageProvider(winrt::AnimatedVisuals::LottieCodegenSourceProvider()));


Codegen animations are supported by adding LottieAnimation items to your project file. These will be compiled into your application and available at runtime by name. For example:

xml


    



js
// js



Codegen is available to both C and C++ applications. Dynamic loading of JSON strings at runtime is currently only supported in C applications.

Top issues

Discussions

Latest release

Release 7.5.1 v7.5.1 2026-11-13
7.5.1 (2026-11-13)


 Bug Fixes

 ios: make constantsToExport return type non-optional (1486) (455b886)

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON