react-spring-physics

Implements physics-based spring animations in React using React Spring and Popmotion.

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/Dhruv-Ghanchi/Portfolio-Webiste --skill react-spring-physics-dhruv-ghanchi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-spring-physics
Source: https://github.com/Dhruv-Ghanchi/Portfolio-Webiste/tree/main/.agents/skills/react-spring-physics
Command: npx skills add https://github.com/Dhruv-Ghanchi/Portfolio-Webiste --skill react-spring-physics-dhruv-ghanchi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Creating natural, interruptible UI animations in React is difficult with duration-based tweens, which feel artificial when interrupted and lose momentum on direction changes. This Skill provides spring-physics animation patterns that calculate motion from mass, tension, and friction for organic, realistic movement. ## Core Features & Use Cases - Spring Animation Patterns: Ready-to-use implementations of useSpring, useTrail, useTransition, useScroll, and useInView hooks for click, scroll, list, and viewport-triggered animations. - Physics Tuning Tools: A calculator script that computes damping ratios, critical friction, and settle times, plus a generator script that outputs boilerplate for seven common animation types. - Gesture and 3D Integration: Patterns for drag interactions with velocity preservation via @use-gesture/react and 3D scene animation via @react-spring/three. - Use Case: Build a draggable card that springs back to position with preserved momentum on release, or animate a list where items enter and exit with staggered spring physics. ## Quick Start Ask the AI to create a click-triggered spring animation component using React Spring with a wobbly config preset.

Frequently Asked Questions about react-spring-physics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a spring animation in React?

Use the useSpring hook from @react-spring/web with from and to values, then apply the returned springs to an animated component's style prop. Configure the feel with mass, tension, and friction, or use presets like config.wobbly and config.gentle.

How do I animate a list of items entering and leaving in React?

Use the useTransition hook with from, enter, and leave style objects plus a keys function to identify items. It returns a render function that wraps each item in an animated.div with spring-driven enter and exit motion.

React Spring vs Framer Motion for animations?

React Spring uses physics simulation based on mass, tension, and friction, producing interruptible motion that preserves velocity when animations change mid-flight. Duration-based libraries offer predictable timing but feel less natural when interrupted by user input.

Does React Spring work with React Three Fiber?

Yes, the @react-spring/three package provides animated wrappers for Three.js objects and materials. You can spring-animate properties like scale, position, and color on meshes inside a React Three Fiber Canvas.

Why does my React Spring animation never finish?

The default precision of 0.0001 can cause excessive updates before the spring settles. Increase precision to 0.01 in the config so the animation completes when values are close enough to the target.

How do I disable React Spring animations for testing?

Call Globals.assign({ skipAnimation: true }) from @react-spring/web in your test setup to make all animations resolve instantly. This also supports prefers-reduced-motion accessibility requirements.