JSPM

react-lottie-loader

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 353
  • Score
    100M100P100Q88307F
  • License MIT

Lottie loader for React

Package Exports

  • react-lottie-loader
  • react-lottie-loader/dist/react-lottie-loader.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-lottie-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Lottie Loader.

Lottie loader for React.

Introduction

Lottie made animations for web sleek and beautiful and of course let designers to have their boundless creativity and use them in your project, just download or create your own Lottie Files.

Install

via npm

npm i react-lottie-loader

via yarn

yarn add react-lottie-loader

Usage

Create your own or download Lottie files from here Lottie Files.

Import animation data and LottieLoader component.

import React from "react";
import catAnimationData 'src/animation/cat-animation.json';
import LottieLoader 'react-lottie-loader';

function App() {
  return (
    <div>
      <LottieLoader animationData={catAnimationData} />
    </div>
  );
}

export default App;

Props

  • animationData: an Object with the exported animation data.
  • autoplay: true / false it will start playing as soon as it is ready
  • className: css class name to pass the animation container.
  • loop: true / false / number
  • name: animation name for future reference
  • path: the relative path to the animation object. (animationData and path are mutually exclusive)
  • renderer: 'svg' / 'canvas' / 'html' to set the renderer

Contributing

Contributions, issues and feature request are welcome! 💜

Fell free to check the issues page


Authors