All Projects → Gamote → Lottie React

Gamote / Lottie React

Licence: other
A lightweight React library for rendering complex After Effects animations in real time using Lottie.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Lottie React

Component Size
React hook for determining the size of a component
Stars: ✭ 224 (+169.88%)
Mutual labels:  hook, component
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+108.43%)
Mutual labels:  hook, component
React Timer Hook
React timer hook
Stars: ✭ 118 (+42.17%)
Mutual labels:  hook, component
React Laag
Hooks to build things like tooltips, dropdown menu's and popovers in React
Stars: ✭ 568 (+584.34%)
Mutual labels:  hook, component
React Vim Wasm
Vim editor embedded in your React web application
Stars: ✭ 77 (-7.23%)
Mutual labels:  component
React Mde
📝 React Markdown Editor
Stars: ✭ 1,196 (+1340.96%)
Mutual labels:  component
Component Pattern For Angular Js 1 X
Example of implementation of Component pattern for Angular JS 1.X using ES6 & Webpack
Stars: ✭ 75 (-9.64%)
Mutual labels:  component
React Hook Mighty Mouse
🐭 React hook that tracks mouse events on selected element - zero dependencies
Stars: ✭ 75 (-9.64%)
Mutual labels:  hook
React Native Dialog Component
A react native dialog component support custom animation for IOS & Android.
Stars: ✭ 81 (-2.41%)
Mutual labels:  component
Percy Storybook
Percy's Storybook SDK.
Stars: ✭ 80 (-3.61%)
Mutual labels:  component
Reactjs Popup
React Popup Component - Modals,Tooltips and Menus —  All in one
Stars: ✭ 1,211 (+1359.04%)
Mutual labels:  component
Phfcomposebarview
Compose bar from iOS 7 Messages.app
Stars: ✭ 1,197 (+1342.17%)
Mutual labels:  component
Rn Components Kit
A series of commonly used react-native components
Stars: ✭ 79 (-4.82%)
Mutual labels:  component
Security
The Security component provides a complete security system for your web application.
Stars: ✭ 1,195 (+1339.76%)
Mutual labels:  component
Wymaterialbutton
Interactive and fully animated Material Design button for iOS developers.
Stars: ✭ 80 (-3.61%)
Mutual labels:  component
Vue Standalone Component
Vuejs template to build components with livecoding, tests, documentation and demos
Stars: ✭ 75 (-9.64%)
Mutual labels:  component
Ysf
YSF Server Functions
Stars: ✭ 77 (-7.23%)
Mutual labels:  hook
Security Csrf
The Security CSRF (cross-site request forgery) component provides a class CsrfTokenManager for generating and validating CSRF tokens.
Stars: ✭ 1,220 (+1369.88%)
Mutual labels:  component
Ng2 Fan Menu
Angular Fan Menu
Stars: ✭ 76 (-8.43%)
Mutual labels:  component
Dynamicoc
深入理解 iOS 热修复原理
Stars: ✭ 76 (-8.43%)
Mutual labels:  hook

lottie-react

npm version npm downloads/month Build Status Codacy Badge Known Vulnerabilities Coverage Status Tested with jest GitHub license

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

Install react, react-dom and prop-types if you don’t have them already:

Note: This library is using React hooks so the minimum version required for both react and react-dom is 16.8.0.

npm i [email protected]^16.8.0 [email protected]^16.8.0 [email protected]^15.5.7

Install lottie-react using npm:

npm i lottie-react

Usage

Component

import Lottie from "lottie-react";
import groovyWalkAnimation from "./groovyWalk.json";

const Example = () => {
  return <Lottie animationData={groovyWalkAnimation} />;
};

export default Example;

Try it on CodeSandbox

Hook

import { useLottie } from "lottie-react";
import groovyWalkAnimation from "./groovyWalk.json";

const Example = () => {
  const options = {
    animationData: groovyWalkAnimation,
    loop: true,
    autoplay: true,
  };

  const { View } = useLottie(options);

  return View;
};

export default Example;

Try it on CodeSandbox

Documentation

Checkout the Documentation for more information and examples.

Test

npm test

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

Let us know if you have any suggestions or contributions. This package has the mission to help developers, so if you have any features that you think we should prioritize, reach out to us.

Projects to check out

  • lottie-web - Lottie implementation for Web. Our project is based on it and you should check it because it will help you understand what's behind this package and it will give you a better understanding on what features should 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? LottieFiles is the way to go!

License

lottie-react is available under the MIT license.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].