0.1.4 • Published 3 years ago

@jedidiah/react-lottie v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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

0.1.2

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago