ReactJs | 8 Best NPM Packages to Build Animation 2021

Arifur Rahman
4 min readAug 10, 2021
collected from wallpapercave

User Interface Design is one of the most important part of your web app. Since web design has drastically improved, web animation plays a key role for website designers to draw more users in. Most are trying to use it more and more, not only to fill the page, but also to indicate the workflow of a page. We use animation to indicate errors in forms, where to click, improve conversions, and so much more. The attention of a user often follows animations, which is the main reason for their use.

1.React Spring

react-spring is a spring-physics based animation library that should cover most of your UI related animation needs. It gives you tools flexible enough to confidently cast your ideas into moving interfaces.

This library represents a modern approach to animation. It is very much inspired by Christopher Chedeau’s animated and Cheng Lou’s react-motion. It inherits animated’s powerful interpolations and performance, as well as react-motion’s ease of use. But while animated is mostly imperative and react-motion mostly declarative, react-spring bridges both. You will be surprised how easy static data is cast into motion with small, explicit utility functions that don’t necessarily affect how you form your views.

Link: react-spring

2. React Reveal

React Reveal is high performance animation library for React. It’s MIT licensed, has a small footprint and written specifically for React in ES6. It can be used to create various cool reveal on scroll effects. Scroll down to see it in action.

Link: React Reveal

3. Styled-Component

styled-components is the result of wondering how we could enhance CSS for styling React component systems. By focusing on a single use case we managed to optimize the experience for developers as well as the output for end users.

Apart from the improved experience for developers, styled-components provides:

  • Automatic critical CSS: styled-components keeps track of which components are rendered on a page and injects their styles and nothing else, fully automatically. Combined with code splitting, this means your users load the least amount of code necessary.
  • No class name bugs: styled-components generates unique class names for your styles. You never have to worry about duplication, overlap or misspellings.
  • Easier deletion of CSS: it can be hard to know whether a class name is used somewhere in your codebase. styled-components makes it obvious, as every bit of styling is tied to a specific component. If the component is unused (which tooling can detect) and gets deleted, all its styles get deleted with it.
  • Simple dynamic styling: adapting the styling of a component based on its props or a global theme is simple and intuitive without having to manually manage dozens of classes.
  • Painless maintenance: you never have to hunt across different files to find the styling affecting your component, so maintenance is a piece of cake no matter how big your codebase is.
  • Automatic vendor prefixing: write your CSS to the current standard and let styled-components handle the rest.

You get all of these benefits while still writing the CSS you know and love, just bound to individual components.

Link: styled-components

4.React vis

React-vis is a React visualization library. When you can use react-vis, you can create complex charts with a minimum amount of code and sensible defaults, however, you can also customize every aspect of your chart. React-vis handles a great number of charts, from area charts to treemaps. React-vis components are designed to work just like other React components. They have properties, children and callbacks. They can be composed. If you can work with React components, you can work with React-Vis.

Link: react-vis

5. Framer Motion

A production-ready motion library for React. Utilize the power behind Framer, the best prototyping tool for teams. Proudly open source.

Link: https://www.remotion.dev/

6. React Typical

it’s a smart React.js library that will animate the typing in only ~400bytes.

If you ever wanted to create a headline that will showcase your multiple skills or you had to simulate typing, this library is for you.

Link: react-typical

7. React GSAP

GreenSock Animation Platform (GSAP) in React in a fully declarative way.

Link: React and GSAP Animation

8. React Anime

React Anime as the name suggests is a React Wrapper for one of the popular animation library Anime.js. All Anime.js functionalities wrapped into their declarative form.

Link: React Anime (alain.xyz)

Thanks !

--

--