Description
React-Motion is a React animation library built around spring physics. Instead of hard-coded easing curves and durations, you set a stiffness and a damping value for a UI element and let the physics produce the motion. The project says this covers most component animations and that it handles interrupted animations without extra work, which is the usual source of awkward motion. You write a spring with a call such as spring(10, with stiffness and damping values), and pass it to components. The exports are spring, Motion, StaggeredMotion, TransitionMotion and a set of presets, and the library also offers a more powerful alternative to React's TransitionGroup. Its default stiffness is 170 and its default damping is 26, and a precision setting controls rounding. Installation is through npm, and the README warns that the Bower package must be installed from the bower.zip link instead of by name. The library works with React Native from version 0.18. The repository includes demos such as a simple transition, draggable balls, a TodoMVC list transition, a photo gallery and water ripples, which you can run locally in development or production mode.…
Highlights
- Spring physics instead of fixed easing curves
- Motion, StaggeredMotion and TransitionMotion components
- Handles interrupted animations
- Works with React Native from version 0.18
- Demos including a spring parameters chooser
Ratings & Reviews
No ratings yet
Be the first to rate react-motion.
People also visit
react-motion FAQ
What is React-Motion?
A React library for animating components with spring physics, configured by stiffness and damping.
How do I install it?
Run npm install --save react-motion. The README warns that the Bower package has to be installed from its bower.zip link.
What are the default spring values?
A stiffness of 170 and a damping of 26, with a precision of 0.01 unless you change them.
Does it work with React Native?
Yes, from React Native version 0.18.
Which components are exported?
spring, Motion, StaggeredMotion, TransitionMotion and presets.
Can I try the demos before using it?
Yes. The repository has demos you can run locally. Use the production build when you test performance.
What are the best react-motion alternatives?
Popular alternatives to react-motion include react-smooth, Motion Primitives and react-move. See all react-motion alternatives














