Lottie React Native provides comprehensive React Native bindings for the Lottie animation ecosystem, enabling the display of Adobe After Effects animations exported as JSON files via Bodymovin. Currently stable at version 7.3.6, the library maintains an active release cadence with frequent bug fixes and feature updates, often including support for new React Native versions and Expo SDKs. Its primary differentiation lies in allowing designers to directly ship complex animations without requiring engineers to painstakingly recreate them in code. It offers native rendering on iOS (using `lottie-ios`), Android (using `lottie-android`), and Windows (using `Lottie-Windows`), ensuring high performance and fidelity across platforms. The package ships with TypeScript types, facilitating robust development.
npm install lottie-react-nativeVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate and control a Lottie animation using a local JSON file within a React Native component, including playback controls and lifecycle events.
Consult the MIGRATION-5-TO-6.md guide on the GitHub repository for detailed upgrade instructions and changes from v5 to v6.
For versions 7.3.0 and 7.3.1, explicitly use the `containerStyle` prop for outer container styling. As of v7.3.2, backward compatibility was restored, so direct `style` prop usage on `LottieView` might work, but `containerStyle` is the recommended explicit prop for the outer container.
Run `yarn add @lottiefiles/dotlottie-react` or `npm install @lottiefiles/dotlottie-react` when targeting web platforms in addition to `lottie-react-native`.
Ensure `@lottiefiles/dotlottie-react` is at least `^0.13.5` to maintain compatibility with React 19 and newer React Native/Expo SDK versions.
Upgrade `lottie-react-native` to version `7.2.3` or higher, which includes a specific fix for this Kotlin type mismatch error.
For iOS, navigate to your `ios` directory and run `pod install`. For Android, try `npx react-native start --reset-cache` and a clean build of your app (e.g., `cd android && ./gradlew clean` then rebuild). Ensure autolinking is functional or manually link if necessary.
Change your import statement from `import { LottieView } from 'lottie-react-native';` to `import LottieView from 'lottie-react-native';`Update `lottie-react-native` to version `7.3.4` or newer, which includes a fix addressing the `TextAttributeProps.UNSET` import for React Native 0.82+.