Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
The @amazon-devices/lottie-react-native library extends Lottie React Native to support Lottie animations in React Native for Vega (RNV) apps. You can use this library in both TypeScript and JavaScript RNV projects to run Lottie animations. You don’t need to install this library separately, as it comes pre-installed with RNV apps. It functions as an autolinking library, connecting to your app at runtime. Remember that compatibility is only guaranteed between the library and its corresponding RNV version. Amazon recommends updating the library version when you upgrade your RNV version. This practice helps maintain consistency and allows you to use the latest features and improvements.

Installation

To use the package, use the following instructions:
  1. Add the JavaScript library dependency in the package.json file. Select the tab for your React Native version.
  1. Reinstall package-lock.json file using npm install command.
  2. Add your Lottie animation to <app_package_root>/src/js/resources/. Add images for Lottie animation to <app_package_root>/assets/image/.
On Vega, you can place Lottie animations (not its image assets) in <app_package_root>/assets/raw/.

Examples

You can use Lottie in a declarative way, as shown in the following example.
Alternatively, you can use this imperative API as shown in the following example.

APIs

RNV uses lottie-react-native to add support for Lottie animations and supports the same APIs as lottie-react-native APIs. The @amazon-devices/lottie-react-native library does not support iOS, Android, and Windows-specific props.

Component API

Methods (Imperative API)

As shown in the Examples, you can control the Lottie component in an imperative manner by capturing the component with React.useRef. The reference provides access to the methods listed below, which you can use to have more fine-grained control over your animation’s behavior. You can’t invoke any of these methods when the animation is in the same state. For example, you can’t invoke play() while the animation plays. If you invoke play() with different parameters while the animation plays, the library uses the parameters passed in the most recent invocation.

Exceptions on Vega

The following actions and APIs are not supported on Vega:
  • Passing a remote asset to ‘source’ with a URI
  • .lottie format assets
  • ColorFilters
  • Test filter - there is no equivalent to TestFilterIos or TestFilterAndroid on Vega

imageAssetsFolder usage

To use the imageAssetsFolder property in RNV, follow these steps:
  1. Copy your image assets into [PROJECT FOLDER]/assets/image.
  2. Create a lottie subfolder Create subfolders for each animation if needed.
  3. In the imageAssetsFolder prop, refer to the folder using its relative path. For example: imageAssetsFolder={‘lottie/animation_1’}.
By default, RNV provides [PROJECT FOLDER]/assets/image. You don’t need to update imageAssetsFolder for images added directly to this folder. For example, the following path doesn’t require an imageAssetsFolder update: [PROJECT FOLDER]/assets/image/images/img_0.png. The following example shows a JSON structure for reference.

Supported versions


Last modified on June 26, 2026