react-spring drives UI motion with spring physics in React. It supports declarative hooks or imperative APIs, default springs, and duration-based easings across web, native, and canvas stacks.
Overview
react-spring is an animation library for React that treats spring physics as the default way to move interface values. Teams use it to choreograph transitions and interactions without bolting ad hoc timing curves onto every component.
Animations can be written declaratively with hooks such as useSpring or driven imperatively so updates can bypass React re-renders during motion. The library covers both fluid spring motion and fixed durations with easing when a timed curve is required.
Packages are split by rendering target so bundles stay smaller. Documented targets include the DOM, React Native, react-three-fiber, Konva, and Zdog, with separate entry points for web, native, three, konva, and zdog.
The animated helper attaches animated values to DOM or host nodes, and the project advertises server-side rendering support and TypeScript typings. Imperative controllers can respond to events while limiting render churn, and interpolated values can cover strings, numbers, and CSS variables for use alongside other React UI libraries.
Key features
- Spring-physics animations by default
- Declarative hooks and imperative APIs
- Targets for web, native, three, konva, zdog
- Animate without extra React re-renders
- Duration-based easings alongside springs
- SSR support and TypeScript typings
- String, number, and CSS variable interpolation
- Works with external component libraries
Use cases
- Page and panel transitions
- Scroll-reveal and visibility toggles
- Three.js scenes via react-three-fiber
- Mobile React Native motion
- Canvas UIs with Konva or Zdog