Gathering detailed insights and metrics for react-lottie
Gathering detailed insights and metrics for react-lottie
Gathering detailed insights and metrics for react-lottie
Gathering detailed insights and metrics for react-lottie
Render After Effects animations on React based on lottie-web
npm install react-lottie
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,688 Stars
175 Commits
361 Forks
12 Watching
9 Branches
22 Contributors
Updated on 27 Nov 2024
Minified
Minified + Gzipped
JavaScript (83.8%)
HTML (8.3%)
Shell (7.9%)
Cumulative downloads
Total Downloads
Last day
-4.4%
53,423
Compared to previous day
Last week
2.7%
277,099
Compared to previous week
Last month
11.5%
1,168,615
Compared to previous month
Last year
-26.8%
12,832,017
Compared to previous year
2
1
23
https://chenqingspring.github.io/react-lottie
bodymovin is Adobe After Effects plugin for exporting animations as JSON, also it provide bodymovin.js for render them as svg/canvas/html.
We currently support solids, shape layers, masks, alpha mattes, trim paths, and dash patterns. And we’ll be adding new features on a regular basis.
You can go forward, backward, and most importantly you can program your animation to respond to any interaction.
Bundle vector animations within your app without having to worry about multiple dimensions or large file sizes. Alternatively, you can decouple animation files from your app’s code entirely by loading them from a JSON API.
Learn more › http://airbnb.design/lottie/
Looking for lottie files › https://www.lottiefiles.com/
Install through npm:
npm install --save react-lottie
Import pinjump.json as animation data
1import React from 'react' 2import Lottie from 'react-lottie'; 3import * as animationData from './pinjump.json' 4 5export default class LottieControl extends React.Component { 6 7 constructor(props) { 8 super(props); 9 this.state = {isStopped: false, isPaused: false}; 10 } 11 12 render() { 13 const buttonStyle = { 14 display: 'block', 15 margin: '10px auto' 16 }; 17 18 const defaultOptions = { 19 loop: true, 20 autoplay: true, 21 animationData: animationData, 22 rendererSettings: { 23 preserveAspectRatio: 'xMidYMid slice' 24 } 25 }; 26 27 return <div> 28 <Lottie options={defaultOptions} 29 height={400} 30 width={400} 31 isStopped={this.state.isStopped} 32 isPaused={this.state.isPaused}/> 33 <button style={buttonStyle} onClick={() => this.setState({isStopped: true})}>stop</button> 34 <button style={buttonStyle} onClick={() => this.setState({isStopped: false})}>play</button> 35 <button style={buttonStyle} onClick={() => this.setState({isPaused: !this.state.isPaused})}>pause</button> 36 </div> 37 } 38} 39
The <Lottie />
Component supports the following components:
options required
the object representing the animation settings that will be instantiated by bodymovin. Currently a subset of the bodymovin options are supported:
loop options [default:
false
]autoplay options [default:
false
]animationData required
rendererSettings required
width optional [default: 100%
]
pixel value for containers width.
height optional [default: 100%
]
pixel value for containers height.
eventListeners optional [default: []
]
This is an array of objects containing a eventName
and callback
function that will be registered as eventlisteners on the animation object. refer to bodymovin#events where the mention using addEventListener, for a list of available custom events.
example:
1eventListeners=[ 2 { 3 eventName: 'complete', 4 callback: () => console.log('the animation completed:'), 5 }, 6]
isClickToPauseDisabled optional [default: false
]
When this props is left unspecified or is set to false
animations are paused or resumed when a user clicks or taps them. If you do not want this behaviour set this prop to true
.
Your contributions and suggestions are heartily welcome.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
57 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More