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
Fiduciary Duties in Partnerships
Top Swimming Pool Dangers (Interactive) | CTC Training
Will Byers X Male Reader
Netr Aerial Viewer
Using GPT for translation: How to get the best outcomes
Main Moon Ilion Menu
Form V/Legends
Tap Tap Run Coupon Codes
Nation Hearing Near Me
Ribbit Woodbine
10000 Divided By 5
Achivr Visb Verizon
Lycoming County Docket Sheets
Employeeres Ual
Rapv Springfield Ma
Oppenheimer Showtimes Near Cinemark Denton
Aktuelle Fahrzeuge von Autohaus Schlögl GmbH & Co. KG in Traunreut
D10 Wrestling Facebook
Craigslist Blackshear Ga
iLuv Aud Click: Tragbarer Wi-Fi-Lautsprecher für Amazons Alexa - Portable Echo Alternative
Northern Whooping Crane Festival highlights conservation and collaboration in Fort Smith, N.W.T. | CBC News
[Birthday Column] Celebrating Sarada's Birthday on 3/31! Looking Back on the Successor to the Uchiha Legacy Who Dreams of Becoming Hokage! | NARUTO OFFICIAL SITE (NARUTO & BORUTO)
Band Of Loyalty 5E
Hermitcraft Texture Pack
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Best Transmission Service Margate
Best Boston Pizza Places
Wrights Camper & Auto Sales Llc
Gillette Craigslist
Delta Township Bsa
Netspend Ssi Deposit Dates For 2022 November
Dexter Gomovies
O'reilly's In Monroe Georgia
Joann Fabrics Lexington Sc
Meggen Nut
Gt7 Roadster Shop Rampage Engine Swap
Bursar.okstate.edu
100 Million Naira In Dollars
1987 Monte Carlo Ss For Sale Craigslist
Justin Mckenzie Phillip Bryant
Western Gold Gateway
Gets Less Antsy Crossword Clue
Mohave County Jobs Craigslist
Pay Entergy Bill
„Wir sind gut positioniert“
Discover Wisconsin Season 16
craigslist: modesto jobs, apartments, for sale, services, community, and events
How Big Is 776 000 Acres On A Map
Brown launches digital hub to expand community, career exploration for students, alumni
Enr 2100
Diamond Spikes Worth Aj
Guidance | GreenStar™ 3 2630 Display
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.