0.1.1 • Published 5 years ago
@irhamputra/use-lottie v0.1.1
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