✨A tiny package for stringing together Lottie animations, written in TypeScript ✨
yarn add react-native-lottie-sequence
npm install --save react-native-lottie-sequence
import React from 'react';
import LottieSequence from 'react-native-lottie-sequence';
import animation1 from './animation1.json';
import animation2 from './animation2.json';
const MyAnimationSequence = () => {
return <LottieSequence sources={[animation1, animation2]} loopMode={'all'} />;
};
prop name | values | required | default | description |
---|---|---|---|---|
sources |
Array of Lottie sources | yes | [] |
Sequence of source animations to play. |
autoPlay |
true , false |
no | false |
Whether to auto-play each animation. |
loopMode |
'none' , 'last' , 'all' |
no | 'none' |
What kind of sequence looping behaviour is wanted. 'none' plays the sequence once, 'last' loops the last animation in the sequence only, and 'all' loops the entire sequence. |
onAnimationFinish |
function | no | () => {} |
Callback fired at the end of each animation in the sequence. |
MIT © tn12787