> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# my.createLottieContext

> Create a context for controlling Lottie animations.

Use this API to create a context object for controlling Lottie animation playback.

## Parameters

| Property | Type   | Required | Description                |
| -------- | ------ | -------- | -------------------------- |
| lottieId | String | Yes      | ID of the lottie component |

## Return Value

Returns a LottieContext object with playback control methods.

## LottieContext Methods

| Method                              | Description                                                                                    |
| ----------------------------------- | ---------------------------------------------------------------------------------------------- |
| play()                              | Start animation                                                                                |
| pause()                             | Pause animation                                                                                |
| stop()                              | Stop animation                                                                                 |
| setSpeed({value})                   | Set playback speed; a positive number is fast-forward speed, a negative number is rewind speed |
| goToAndStop({value})                | Move the animation to the target progress (0.0-1.0) and stop it there                          |
| goToAndPlay({value})                | Move the animation to the target progress (0.0-1.0) and play from that progress                |
| playFromMinToMaxProgress({min,max}) | Play the animation from the minimum to the maximum progress interval (0.0-1.0)                 |
| playFromMinToMaxFrame({min,max})    | Play the animation from the minimum to the maximum frame interval                              |
| downgradeToPlaceholder()            | Downgrade the animation to the default placeholder image                                       |

## Code Example

```javascript theme={null}
const lottieContext = my.createLottieContext('myLottie');

lottieContext.play();

// Pause after 2 seconds
setTimeout(() => {
  lottieContext.pause();
}, 2000);
```

```xml theme={null}
<lottie id="myLottie" path="animation.json" autoplay="{{false}}" />
```
