0.1.1 • Published 5 years ago

@irhamputra/use-lottie v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Install

npm install --save use-lottie

Usage

import React from 'react'
import { useLottie } from 'use-lottie'
import groovyWalkAnimation from "./groovyWalk.json";

const style = {
    // declare your style here
}

const ReactComponent = () => {
  const options = {
          animationData: groovyWalkAnimation,
          loop: true,
          autoplay: true,
          style
      };

  const { LottieView } = useLottie(options)

  return (
    <LottieView />
  )
}

License

MIT © irhamputra

0.1.1

5 years ago

0.1.0

5 years ago