# React JS

1. First, install Lottielab's [Lottie player](https://www.npmjs.com/package/@lottielab/lottie-player) from npm by running:

```
npm install --save @lottielab/lottie-player
```

2. Import the React component:

```
import Lottie from '@lottielab/lottie-player/react';
```

3. Use the `Lottie` React component to display your Lottie using your [Livelink](https://docs.lottielab.com/export-and-hand-off/livelink-cdn):&#x20;

```
<Lottie src="https://cdn.lottielab.com/insertyourlottieanimationlink.json" autoplay />
```

[Check out the documentation for Lottielab's Lottie player](https://github.com/lottielab/lottie-player?tab=readme-ov-file#-react-component), where you can learn how to control various aspects of the player, such as playback speed, loop, and control it programatically.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lottielab.com/export-and-hand-off/code-export-platforms/web/react-js.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
