Skip to main content

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.

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

Parameters

PropertyTypeRequiredDescription
lottieIdStringYesID of the lottie component

Return Value

Returns a LottieContext object with playback control methods.

LottieContext Methods

MethodDescription
play()Start animation
pause()Pause animation
stop()Stop animation
setSpeed(speed)Set playback speed

Code Example

const lottieContext = my.createLottieContext('myLottie');

lottieContext.play();

// Pause after 2 seconds
setTimeout(() => {
  lottieContext.pause();
}, 2000);
<lottie id="myLottie" path="animation.json" autoplay="{{false}}" />