react-native-lottie-sequence
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

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

Package Sidebar

Install

npm i react-native-lottie-sequence

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

18.1 kB

Total Files

10

Last publish

Collaborators

  • tn12787