React Spring

React Spring

www.react-spring.dev

2

About this website

React Spring is a spring-physics animation library for React, developed as part of the Poimandres open-source collective alongside React Three Fiber and Zustand. The library departs from traditional duration-and-easing-curve animation APIs by using spring physics models, where animations have no fixed duration or predefined curve, resulting in motion that feels natural and responsive to continuous user interaction. React Spring supports five distinct render targets through separate packages: @react-spring/web for HTML and SVG elements, @react-spring/native for React Native components, @react-spring/three for three.js objects via React Three Fiber, @react-spring/konva for Konva canvas shapes, and @react-spring/zdog for zdog 3D primitives. The hook-based API includes useSpring for animating a single set of values, useSprings for lists of animated values, useTrail for staggered sequential animations, useChain for orchestrating multiple animation sequences, and useTransition for animating mount and unmount transitions of components. The imperative API mutates animation values directly without triggering React re-renders, achieving performance comparable to direct DOM manipulation while maintaining the declarative React programming model. Bundle sizes are optimized through tree-shaking: the full react-spring package is 55.1 kilobytes, @react-spring/web is 19.2 kilobytes, and @react-spring/core is 15.2 kilobytes. The library is TypeScript-first with complete type definitions and supports server-side rendering. It has been endorsed by Ryan Florence, co-founder of Remix, and Ives van Hoorne, creator of CodeSandbox, with an active community on GitHub and Discord.

Tags & Categories

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!