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. This library is autolinking, so it connects to your app at runtime. 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, follow these instructions:
  1. Add the JavaScript library dependency in your application’s package.json:
  2. Reinstall package-lock.json file using the npm install command.
  3. Add your Lottie animation to <app_package_root>/src/js/resources/. Add images for the 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.

API reference

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 doesn’t support iOS, Android, and Windows-specific props.

Components

Methods

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.

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.

Known issues and limitations

The following actions and APIs aren’t supported on Vega:
  • Passing a remote asset to ‘source’ with a URI
  • .lottie format assets
  • ColorFilters
  • TextFilterVega

Supported versions

Supported Third-Party Libraries and Services.
Last modified on September 30, 2025