lottie-react (2024)

lottie-react (1) lottie-react (2) lottie-react (3) lottie-react (4) lottie-react (5) lottie-react (6)

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.

Installation

  1. 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.

  2. Install lottie-react using yarn

    yarn add lottie-react

    or npm

    npm i lottie-react

Usage

Using the component (try it)

import React from "react";import Lottie from "lottie-react";import groovyWalkAnimation from "./groovyWalk.json";const App = () => <Lottie animationData={groovyWalkAnimation} loop={true} />;export default App;

Using the Hook (try it)

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;

๐Ÿ“„ Documentation

Checkout the documentation at https://lottiereact.com for more information and examples.

Tests

Run the tests using the yarn test command.

Coverage report

-----------------------------|---------|----------|---------|---------|-------------------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 | -----------------------------|---------|----------|---------|---------|-------------------

Contribution

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.

๐Ÿ‘ฉโ€๐Ÿ’ป v3 is 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 the v3 branch. And of course, you are encouraged to contribute. :)

Thank you for investing your time in contributing to our project! โœจ

Projects to check out

  • lottie-web - Lottie implementation for Web. Our project is based on it, and you might want to check it out in order to have a better understanding on what's behind this package or what features could you expect to have in the future.
  • lottie-android - Lottie implementation for Android
  • lottie-ios - Lottie implementation for iOS
  • lottie-react-native - Lottie implementation for React Native
  • LottieFiles - Are you looking for animations files? LottieFiles has a lot of them!

License

lottie-react is available under the MIT license.

Thanks to David Probst Jr for the animations used in the examples.

lottie-react (2024)
Top Articles
Over $1 billion wiped off HEX's valuation following Richard Heart's disparaging remarks
Should You Open a Roth IRA at a Bank? - NerdWallet
Hotels Near 6491 Peachtree Industrial Blvd
Northern Counties Soccer Association Nj
Srtc Tifton Ga
Gamevault Agent
No Hard Feelings Showtimes Near Metropolitan Fiesta 5 Theatre
Women's Beauty Parlour Near Me
Tugboat Information
123 Movies Babylon
LeBron James comes out on fire, scores first 16 points for Cavaliers in Game 2 vs. Pacers
Sams Gas Price Fairview Heights Il
Med First James City
Keniakoop
Aktuelle Fahrzeuge von Autohaus Schlรถgl GmbH & Co. KG in Traunreut
Valentina Gonzalez Leak
Bestellung Ahrefs
Reddit Wisconsin Badgers Leaked
Luna Lola: The Moon Wolf book by Park Kara
Grab this ice cream maker while it's discounted in Walmart's sale | Digital Trends
Roll Out Gutter Extensions Lowe's
Www Craigslist Madison Wi
About My Father Showtimes Near Copper Creek 9
Craigslist Rentals Coquille Oregon
As families searched, a Texas medical school cut up their loved ones
Combies Overlijden no. 02, Stempels: 2 teksten + 1 tag/label & Stansen: 3 tags/labels.
Reserve A Room Ucla
Airg Com Chat
Craigslist/Phx
417-990-0201
Mrstryst
Spy School Secrets - Canada's History
Song That Goes Yeah Yeah Yeah Yeah Sounds Like Mgmt
Gabrielle Enright Weight Loss
Covalen hiring Ai Annotator - Dutch , Finnish, Japanese , Polish , Swedish in Dublin, County Dublin, Ireland | LinkedIn
Craigslist Tulsa Ok Farm And Garden
Saybyebugs At Walmart
ื”ืชื—ื‘ืจ/ื™ ืื• ื”ื™ืจืฉื/ื”ื™ืจืฉืžื™ ื›ื“ื™ ืœืจืื•ืช.
Gasoline Prices At Sam's Club
Florida Lottery Claim Appointment
Busted Newspaper Mcpherson Kansas
Rush Copley Swim Lessons
Is Ameriprise A Pyramid Scheme
Squalicum Family Medicine
Dontrell Nelson - 2016 - Football - University of Memphis Athletics
Accident On 40 East Today
The Latest Books, Reports, Videos, and Audiobooks - O'Reilly Media
Join MileSplit to get access to the latest news, films, and events!
Assignation en paiement ou injonction de payer ?
De Donde Es El Area +63
Texas Lottery Daily 4 Winning Numbers
Latest Posts
Article information

Author: Carmelo Roob

Last Updated:

Views: 6313

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.