Integrate Lottie animated icons into your React app using the lottie-react library.
Add the lottie-react package from npm.
npm install lottie-reactImport your downloaded icon JSON and pass it to the Lottie component.
import Lottie from "lottie-react";
import animationData from "./your_animation.json";
const LottieIcon = () => (
<div style={{ width: 150, height: 150 }}>
<Lottie animationData={animationData} loop={true} />
</div>
);
export default LottieIcon;Use props to control playback, looping, and hook into animation events.
<Lottie
animationData={animationData}
loop={false}
autoplay={false}
onComplete={() => console.log("Animation complete")}
/>