Skip to content

✨A tiny package for stringing together Lottie animations, written in TypeScript ✨

Notifications You must be signed in to change notification settings

tpjnorton/react-native-lottie-sequence

Repository files navigation

react-native-lottie-sequence

✨A tiny package for stringing together Lottie animations, written in TypeScript ✨

NPM JavaScript Style Guide

Install

Yarn

yarn add react-native-lottie-sequence

NPM

npm install --save react-native-lottie-sequence

Usage

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'} />;
};

Props

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.

License

MIT © tn12787

About

✨A tiny package for stringing together Lottie animations, written in TypeScript ✨

Resources

Stars

Watchers

Forks

Packages

No packages published