@jedidiah/react-lottie
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

react-lottie

A proof of concept lightweight wrapper around lottie-web. Very alpha.


Usage

Install

yarn add @jedidiah/react-lottie lottie-web

npm install --save @jedidiah/react-lottie lottie-web

Import

import { Lottie } from '@jedidiah/react-lottie';

Minimal

<Lottie animationData={lottieJson} />

Play State: "playing" | "paused" | "stopped"

<Lottie animationData={lottieJson} playState={playState} />

Speed and direction: number

<Lottie animationData={lottieJson} speed={1} direction={-1} />

Loop: number | boolean

<Lottie animationData={lottieJson} loop={3} /> <Lottie animationData={lottieJson} loop={true} />

Renderer: "svg" | "canvas" | "html";

<Lottie animationData={lottieJson} renderer="canvas" />

rendererSettings: See https://github.com/airbnb/lottie-web#other-loading-options

<Lottie animationData={lottieJson} rendererSettings={rendererSettings} />

Readme

Keywords

none

Package Sidebar

Install

npm i @jedidiah/react-lottie

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

8.28 kB

Total Files

11

Last publish

Collaborators

  • jedidiah