Using with multiple animations
. Creating a multi-animation .lottie file
To create a multi-animation .lottie file, you can use our creation library dotlottie-js.
After following the installation steps for dotlottie-js, you can start creating your own .lotties:
The player by default plays the 1st animation in the manifest. However if you want a specific animation to be played initially, you can pass activeAnimationId
.
The following methods can be used to navigate around multiple animations in a .lottie
next: ( getOptions?: (currPlaybackOptions?: PlaybackOptions, manifestPlaybackOptions?: PlaybackOptions) => PlaybackOptions, ) => void;
play: ( indexOrId?: string | number, getOptions?: (currPlaybackOptions?: PlaybackOptions, manifestPlaybackOptions?: PlaybackOptions) => PlaybackOptions, ) => void;
previous: ( getOptions?: (currPlaybackOptions?: PlaybackOptions, manifestPlaybackOptions?: PlaybackOptions) => PlaybackOptions, ) => void;
reset: () => void;
Last updated