React animation libraries

Updated Nov 2026

React animation libraries move, fade, and resize elements in a React interface as its state changes. A library either interpolates styles with springs and tweens or measures layout changes and animates elements between positions. These libraries let apps show transitions, page changes, and list updates that users can follow.

Popularity

react-transition-group has the most monthly downloads in this comparison, at 208.0M.

LibraryMonthly downloadsStarsLast releaseLicense
react-transition-group
208.0M
10.2KAug 2022BSD-3-Clause
motion
134.5M
35.1KNov 2026MIT
react-smooth
103.6M
284Dec 2024MIT
@react-spring/web
26.7M
29.3KJun 2026MIT
lottie-react
17.3M
971Sep 2026MIT
@formkit/auto-animate
9.0M
14.0KNov 2026MIT
@lottiefiles/dotlottie-react
7.6M
951Nov 2026MIT
@gsap/react
6.6M
344Jan 2025SEE LICENSE AT https://gsap.com/standard-license
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

react-transition-group

Provides a React component toolset for managing animations.

Downloads / mo
208.0M
Stars
10.2K
Last release
4.4.5
License
BSD-3-Clause

Quickstart

From Transition.mdx
$ npm install react-transition-group
import { Transition } from 'react-transition-group';
import { useRef } from 'react';

export default function Fade({ visible }) {
  const nodeRef = useRef(null);
  return (
    <Transition nodeRef={nodeRef} in={visible} timeout={300}>
      {state => (
        <div ref={nodeRef} style={{
          transition: 'opacity 300ms ease-in-out',
          opacity: state === 'entering' || state === 'entered' ? 1 : 0,
        }}>Hello</div>
      )}
    </Transition>
  );
}

react-transition-group examples

From open-source projects on GitHub

Animates React element size and position when layouts change.

Downloads / mo
134.5M
Stars
35.1K
Last release
14.14.0
License
MIT

Strengths

  • Animates layout changes automatically. Add layout to animate size and position changes after React renders.
  • Animates departing React components. Wrap motion components in AnimatePresence to run exit animations.

Limitations

  • Exit tracking needs stable keys. Give AnimatePresence children stable keys so exit animations can run.
  • Inline elements need different display. Use block or inline-block elements for layout animations.

Quickstart

From react.md
$ npm install motion
import { motion } from "motion/react"
  
function Component() {
  return <motion.button animate={{ opacity: 1 }} />
}

motion examples

From open-source projects on GitHub

Animates React components.

Downloads / mo
103.6M
Stars
284
Last release
4.0.4
License
MIT

Quickstart

From README.md
$ npm install --save react-smooth
import Animate from 'react-smooth';

export default function Fade() {
  return (
    <Animate to="0" from="1" attributeName="opacity">
      <div />
    </Animate>
  );
}

react-smooth examples

From open-source projects on GitHub

@react-spring/web

Builds animated React interfaces with spring-driven values.

Downloads / mo
26.7M
Stars
29.3K
Last release
10.1.2
License
MIT

Strengths

  • Animates removable items. Use useTransition to animate items as they enter and leave.
  • Updates without React renders. Use api.start() to change animation targets without rerendering.

Limitations

  • Spring styles need animated elements. Pass spring-driven styles to animated elements to update the display.
$ yarn add @react-spring/web
import { useSpring, animated } from '@react-spring/web';

export default function App() {
  const springs = useSpring({ from: { x: 0 }, to: { x: 100 } });
  return <animated.div style={springs}>Hello</animated.div>;
}

@react-spring/web examples

From open-source projects on GitHub

lottie-react

Plays Lottie animations in React through one component, with access to the whole engine for more control.

Downloads / mo
17.3M
Stars
971
Last release
3.1.2
License
MIT

Quickstart

From README.md
$ npm i lottie-react
import { Lottie } from "lottie-react";

export function Hero() {
  return <Lottie src="/hero.json" autoplay loop />;
}

@formkit/auto-animate

Animates child additions, removals, and moves from a parent element.

Downloads / mo
9.0M
Stars
14.0K
Last release
0.10.2
License
MIT

Strengths

  • Animates DOM changes automatically. Animate added, removed, and moved children from one parent ref.
  • Respects reduced motion automatically. Animations disable when the user requests reduced motion.

Limitations

  • Tracks only immediate children. Changes deeper inside nested descendants do not trigger parent animations.
  • Flex growth needs explicit width. Set an explicit width on children that use flex-grow.

Quickstart

From disable.jsx
$ npm install @formkit/auto-animate
import { useAutoAnimate } from '@formkit/auto-animate/react'

function MyList () {
  const [animationParent] = useAutoAnimate()
  return (
    <ul ref={animationParent}>
      {/* 🪄 Magic animations for your list */}
    </ul>
  )
}

@formkit/auto-animate examples

From open-source projects on GitHub
(node: HTMLTableSectionElement | null) => {
    if (node && !autoAnimateInitialized.current) {
      autoAnimate(node);
      autoAnimateInitialized.current = true;
    }
  }

@lottiefiles/dotlottie-react

Wraps the dotlottie-web library for React.

Downloads / mo
7.6M
Stars
951
Last release
0.22.3
License
MIT

Quickstart

From README.md
$ npm install @lottiefiles/dotlottie-react
import React from 'react';
import { DotLottieReact } from '@lottiefiles/dotlottie-react';

const App = () => {
  return (
    <DotLottieReact
      src="path/to/animation.lottie"
      loop
      autoplay
    />
  );
};

Provides tools for using GSAP in React, such as the useGSAP() hook.

Downloads / mo
6.6M
Stars
344
Last release
2.1.2
License
SEE LICENSE AT https://gsap.com/standard-license

Quickstart

From README.md
$ npm install gsap @gsap/react
import { useRef } from 'react';
import gsap from 'gsap';
import { useGSAP } from '@gsap/react';
gsap.registerPlugin(useGSAP);

export default function MoveBox() {
  const container = useRef(null);
  useGSAP(() => { gsap.to('.box', { x: 100 }); }, { scope: container });
  return <div ref={container}><div className="box">Box</div></div>;
}

@gsap/react examples

From open-source projects on GitHub

FAQ

motion suits layout animations and exit animations for departing components. @react-spring/web suits spring-driven values that update without React renders. @formkit/auto-animate suits lists that animate added, removed, and moved children from one parent ref.

motion animates React element size and position when layouts change. Its AnimatePresence component runs exit animations for departing components.

@react-spring/web builds animated React interfaces with spring-driven values. Its api.start() method changes animation targets without rerendering.

lottie-react plays Lottie animations through one React component, with access to the whole engine for more control.

react-transition-group provides a React component toolset for managing animations.

For coding agents

Found your animation library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official