Skip to content
React Spring logo

React Spring

Spring-physics-based animation library for React by Poimandres (pmndrs). Natural, fluid, and interruption-safe motion.

React Spring Overview

Overview

React Spring is a spring-physics-driven animation library developed by Poimandres (pmndrs). Unlike duration-based transitions, it emulates real-world physical forces (mass, tension, friction), resulting in responsive, organic motion.

Key Features

  • Spring-Physics Engine: Motion inherits velocity and trajectory naturally without rigid easing curves.
  • Interruption-Safe Animations: Seamlessly adapts when user interactions interrupt mid-flight animations.
  • Multi-Platform Support: Works on React DOM, React Native, Canvas, and Three.js (React Three Fiber).
  • Declarative Hooks API: Clean integration via useSpring, useTransition, and useTrail.

Installation & Quick Start

npm install @react-spring/web
import { useSpring, animated } from '@react-spring/web';

export default function App() {
  const springs = useSpring({
    from: { opacity: 0, y: 40 },
    to: { opacity: 1, y: 0 },
  });

  return <animated.div style={springs}>Physics in motion</animated.div>;
}

Why Choose React Spring?

  • Best for: Dynamic interactive UI, gesture-driven interfaces, 3D WebGL scenes, and fluid interactive animations.
  • Not suitable for: Simple entry/exit fade animations where basic CSS transitions suffice.

Comments & Discussion

0 comments
Share your experience, thoughts, or suggestions...

No comments yet. Be the first to share your experience or thoughts!

Related libraries

Curated by category & stack