I have a list of items with scores, ordered by scores, rendered by react.js as a vertically-oriented list of rectangular items (highest scores at top). Hovers and other clicks on the individual items may show/hide extra info, changing their vertical height.
New information arrives that changes the scores, slightly, making some items rank higher and others lower after a re-sort. I'd like the items to simultaneously animate to their new positions, rather than appear in their new locations instantly.
Is there a recommended way to do this in React.js, perhaps with a popular add-on?
(In a similar past situation using D3, a technique I've used was roughly:
Now I'm hoping for a similar effect in a React-ish way...)
React Spring is a modern animation library that is based on spring physics. It's highly flexible and covers most animations needed for a user interface.
React spring is an animation library that makes animating UI elements simple. It is based on spring physics which helps it to achieve a natural look and feel. It is different from other animation libraries where someone has to deal with curves, easing, time durations, all of which in sync with each other.
I just released a module to tackle exactly this problem
https://github.com/joshwcomeau/react-flip-move
It does a few things differently than Magic Move / Shuffle:
Check out the demos:
http://joshwcomeau.github.io/react-flip-move/examples/#/shuffle
React Shuffle is solid and up to date. It's inspired by Ryan Florences Magic Move demo
https://github.com/FormidableLabs/react-shuffle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With