Answers for "lootie file in react"

1

lootie file in react

import React from 'react';
import Lottie from 'react-lottie';
import animationData from './lotties/kiss-of-the-heart';

export default function App() {
  const defaultOptions = {
      loop: true,
      autoplay: true,
      animationData: animationData,
      rendererSettings: {
        preserveAspectRatio: "xMidYMid slice"
      }
    };
  
  return (
    <div>
      <Lottie 
	    options={defaultOptions}
        height={400}
        width={400}
      />
    </div>
  );
}
Posted by: Guest on July-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language