Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
React Spring | 25,739 | 1,464 | 1,337 | 15 hours ago | 363 | September 13, 2022 | 83 | mit | TypeScript | |
✌️ A spring physics based React animation library | ||||||||||
React Three Fiber | 22,682 | 123 | 11 hours ago | 147 | September 23, 2022 | 59 | mit | TypeScript | ||
🇨🇭 A React renderer for Three.js | ||||||||||
Motion | 18,790 | 118 | 1,518 | 2 days ago | 713 | September 20, 2022 | 237 | mit | TypeScript | |
Open source, production-ready animation and gesture library for React | ||||||||||
Lottie React Native | 15,867 | 6,322 | 142 | 5 days ago | 57 | August 05, 2022 | 31 | apache-2.0 | Kotlin | |
Lottie wrapper for React Native. | ||||||||||
React Content Loader | 12,768 | 309 | 249 | 3 months ago | 69 | March 09, 2022 | 9 | mit | TypeScript | |
⚪ SVG-Powered component to easily create skeleton loadings. | ||||||||||
React Transition Group | 9,771 | 47,715 | 4,686 | a month ago | 43 | August 01, 2022 | 218 | other | JavaScript | |
An easy way to perform animations when a React component enters or leaves the DOM | ||||||||||
React Native Animatable | 9,498 | 2,130 | 249 | 13 days ago | 23 | October 13, 2019 | 209 | mit | JavaScript | |
Standard set of easy to use animations and declarative transitions for React Native | ||||||||||
Auto Animate | 7,547 | 11 | 19 days ago | 9 | August 23, 2022 | 48 | mit | TypeScript | ||
A zero-config, drop-in animation utility that adds smooth transitions to your web app. You can use it with React, Vue, or any other JavaScript application. | ||||||||||
React Native Reanimated | 7,300 | 4,847 | 972 | 5 hours ago | 85 | September 22, 2022 | 371 | mit | TypeScript | |
React Native's Animated library reimplemented | ||||||||||
React Move | 6,521 | 323 | 59 | 5 months ago | 60 | June 13, 2021 | 25 | mit | JavaScript | |
React Move | Beautiful, data-driven animations for React |
react-web-animation is a set of React components that expose the Web Animations API in a declarative way.
Check out how you can use it here - http://react-web-animation.surge.sh
Why use this over other animation libraries for React? react-web-animation uses the Web Animations API polyfill so eventually it will use the native browser implementation and not depend on any third-party animation frameworks or CSS. Chrome has the greatest support for these today and if you view the source on the demos, you can see it isn't using CSS at all!
Want to know more about the Web Animations API? Here are some great resources.
react-web-animation requires the following peer dependencies to be installed
npm install react
npm install react-dom
npm install prop-types
npm install react-web-animation
react-web-animation has a runtime dependency on the next
version Web Animations API polyfill.
The easiest way to get this is to grab it from cdnjs
and include it in your application.
<script src="https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.1/web-animations-next.min.js"></script>
<Animated.[componentName]>
e.g. <Animated.div>
and control play state (play, pause, stop, reverse)<Animation>
and control play state (play, pause, stop, reverse)<AnimationGroup>
, controlling them with one timeline<AnimationSequence>
, controlling them with one timelineCreating an animated element is as simple using an <Animated.[elementName]>
component and supplying keyframes
and a timing
config.
import React, { Component } from 'react';
import { Animated } from 'react-web-animation';
export default class Basic extends Component {
getKeyFrames() {
return [
{ transform: 'scale(1)', opacity: 1, offset: 0 },
{ transform: 'scale(.5)', opacity: 0.5, offset: 0.3 },
{ transform: 'scale(.667)', opacity: 0.667, offset: 0.7875 },
{ transform: 'scale(.6)', opacity: 0.6, offset: 1 }
];
}
getTiming( duration ) {
return {
duration,
easing: 'ease-in-out',
delay: 0,
iterations: 2,
direction: 'alternate',
fill: 'forwards'
};
}
render() {
return
<Animated.div keyframes={this.getKeyFrames()}
timing={this.getTiming(2500)}>
Web Animations API Rocks
</Animated.div>;
}
}
For more advanced usage, head over to the source documentation or check out the http://react-web-animation.surge.sh
MIT