React Spring

Physics-based animation library for React

animation

Natural feeling animations with spring physics. Cross-platform.

ReactAnimationPhysicsSpring

๐ŸŽฎ Playground

import { useSpring, animated } from "@react-spring/web"

export default function Demo() {
  const styles = useSpring({
    from: { opacity: 0 },
    to: { opacity: 1 }
  })
  
  return <animated.div style={styles}>Hello</animated.div>
}
Use cases
  • โ€ขInteractive UIs
  • โ€ขData visualizations
  • โ€ขGames
Good for
  • โœ“Physics-accurate animations
  • โœ“Cross-platform apps
  • โœ“Complex gesture handling
Not good for
  • โœ—Simple CSS transitions
  • โœ—Timeline-based animations
Installation
$ npm install @react-spring/web
Example
import { useSpring, animated } from "@react-spring/web"

export default function Demo() {
  const styles = useSpring({
    from: { opacity: 0 },
    to: { opacity: 1 }
  })
  
  return <animated.div style={styles}>Hello</animated.div>
}
Comparison

"More physics-accurate than Framer Motion, steeper learning curve but more control."

Trust Metrics

28.5K

GitHub Stars

1.5M

Weekly Downloads

Last Commit:last year
Used by
UberDiscordShopify