explaingit

chenglou/react-motion

Analysis updated 2026-06-21

21,925JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A React animation library that uses spring physics instead of fixed timings so you describe how bouncy or stiff an animation feels and the library calculates the smooth movement automatically.

Mindmap

mindmap
  root((react-motion))
    What it does
      Physics-based animation
      Spring stiffness and damping
      Smooth transitions
    Components
      Motion single element
      StaggeredMotion lists
      TransitionMotion enter exit
    Use Cases
      Draggable lists
      Photo galleries
      UI polish
    Audience
      React developers
      UI engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add smooth physics-based animations to React components without writing easing math.

USE CASE 2

Build a draggable list where items spring naturally into place after being reordered.

USE CASE 3

Animate elements appearing and disappearing from the page with natural entrance and exit effects.

USE CASE 4

Create a cascading stagger animation where list items move one after another.

What is it built with?

JavaScriptReactnpm

How does it compare?

chenglou/react-motionjarrodwatts/claude-hudhandsontable/handsontable
Stars21,92521,88021,878
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

In plain English

React-Motion is a JavaScript library for adding animations to web applications built with React. Instead of telling an element exactly how long to animate and what path to follow, you describe the animation using "spring physics", the same principles that govern how a real spring moves. You set two values called stiffness and damping, and the library calculates the natural, smooth motion automatically. The core concept is that you don't hard-code timings or easing curves (those are the math formulas that control how an animation speeds up and slows down). Instead, you configure a virtual spring by choosing how stiff or bouncy it should be. React-Motion provides handy presets like "gentle" or "wobbly" so you can pick a feel without worrying about the math. The library then smoothly transitions any numeric value, position, size, opacity, between a starting point and a destination. It offers three main building blocks. The basic Motion component animates a single element. StaggeredMotion animates a list of related items where each item's movement depends on the one before it, creating a natural cascading effect. TransitionMotion handles elements that are appearing or disappearing from the page, giving them smooth entrance and exit animations. Someone would reach for this library when building polished web interfaces where standard CSS transitions feel too rigid or choppy. Demos in the README include draggable lists, chat bubbles, photo galleries, and water ripples, all cases where physics-based movement looks more natural than a fixed-duration transition. It works with both React for web and React-Native for mobile apps. The library is written in JavaScript and installed via npm.

Copy-paste prompts

Prompt 1
Show me how to use react-motion's Motion component to animate a div sliding in from the left using spring physics.
Prompt 2
How do I use StaggeredMotion to make a list of cards animate in one by one with a cascading delay effect?
Prompt 3
Give me a react-motion example using TransitionMotion to smoothly fade and slide new items added to a list.
Prompt 4
How do I use the spring presets like 'wobbly' and 'gentle' in react-motion to control how bouncy an animation feels?
Prompt 5
Show me a draggable sortable list implementation using react-motion where items spring into their new positions.

Frequently asked questions

What is react-motion?

A React animation library that uses spring physics instead of fixed timings so you describe how bouncy or stiff an animation feels and the library calculates the smooth movement automatically.

What language is react-motion written in?

Mainly JavaScript. The stack also includes JavaScript, React, npm.

How hard is react-motion to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is react-motion for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub chenglou on gitmyhub

Verify against the repo before relying on details.