
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
lottie-react
Advanced tools
This project is meant to give developers full control over Lottie instance with minimal implementation by wrapping lottie-web in a Component or Hook that can be easily used in React applications.
Make sure you have the peer-dependencies installed: react and react-dom.
Note: This library is using React Hooks so the minimum version required for both react and react-dom is v16.8.0.
Install lottie-react using yarn
yarn add lottie-react
or npm
npm i lottie-react
import React from "react";
import Lottie from "lottie-react";
import groovyWalkAnimation from "./groovyWalk.json";
const App = () => <Lottie animationData={groovyWalkAnimation} loop={true} />;
export default App;
import React from "react";
import { useLottie } from "lottie-react";
import groovyWalkAnimation from "./groovyWalk.json";
const App = () => {
const options = {
animationData: groovyWalkAnimation,
loop: true
};
const { View } = useLottie(options);
return <>{View}</>;
};
export default App;
Checkout the documentation at https://lottiereact.com for more information and examples.
Run the tests using the yarn test command.
-----------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------------------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
components | 100 | 100 | 100 | 100 |
Lottie.ts | 100 | 100 | 100 | 100 |
hooks | 100 | 100 | 100 | 100 |
useLottie.tsx | 100 | 100 | 100 | 100 |
useLottieInteractivity.tsx | 100 | 100 | 100 | 100 |
-----------------------------|---------|----------|---------|---------|-------------------
Any questions or suggestions? Use the Discussions tab. Any issues? Don't hesitate to document it in the Issues tab, and we will do our best to investigate it and fix it. Any solutions? You are very welcomed to open a pull request.
👩💻
v3is under development and is planning to bring a lot of features and improvements. But unfortunately, at the moment all the maintainers are super busy with work related projects. You can check out the progress under thev3branch. And of course, you are encouraged to contribute. :)
Thank you for investing your time in contributing to our project! ✨
lottie-react is available under the MIT license.
Thanks to David Probst Jr for the animations used in the examples.
react-lottie is another React wrapper for Lottie animations. It provides similar functionality to lottie-react, allowing you to render and control Lottie animations in your React applications. However, lottie-react is often preferred for its more modern API and better performance.
lottie-web is the core library for rendering Lottie animations in web applications. While it is not specifically designed for React, it can be used with React by manually integrating it into your components. lottie-react simplifies this process by providing a dedicated React component.
react-lottie-player is another alternative for integrating Lottie animations in React applications. It offers a similar set of features to lottie-react, including support for controlling playback and adding event listeners. Some developers prefer react-lottie-player for its additional customization options.
FAQs
Lottie for React
The npm package lottie-react receives a total of 1,941,945 weekly downloads. As such, lottie-react popularity was classified as popular.
We found that lottie-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.