# React Spring

> Spring-physics animation hooks for React, React Native and react-three-fiber.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/react-spring

free

Spring-physics animation hooks for React, React Native and react-three-fiber.

by Poimandres (pmndrs)[GitHub](https://github.com/pmndrs/react-spring)[npm](https://npmjs.com/package/@react-spring/web)

[visit](https://www.react-spring.dev/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://www.react-spring.dev](https://www.react-spring.dev/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

no preview

### [@use-gesture](https://tastebase.ehsanulsiam.workers.dev/browse/use-gesture)

Hooks that turn pointer, wheel, pinch and scroll events into clean gesture state (offset, velocity, direction).

no preview

### [React Three Fiber](https://tastebase.ehsanulsiam.workers.dev/browse/r3f)

React renderer for three.js: build 3D scenes as JSX components with hooks.

no preview

### [tw-animate-css](https://tastebase.ehsanulsiam.workers.dev/browse/tw-animate-css)

Tailwind v4 CSS-only enter and exit animation utilities (animate-in, fade-in, slide-in-from-top).

## For your agent

##### Install

`npm i @react-spring/web`

##### Use it for

- physics-driven values in a react-three-fiber scene (@react-spring/three)
- drag-to-throw cards or sheets with use-gesture, where velocity carries into the spring
- animating values that never touch the DOM style directly (canvas, WebGL uniforms)

##### Skip it when

- ordinary DOM UI in React: motion has a simpler API, exit animations and layout animations built in
- duration-and-easing timelines: use gsap
- a new project with no r3f: prefer motion; react-spring mostly makes sense next to pmndrs tooling

##### What's inside22 free

- animated elements
- useSpring
- useSprings
- useTrail
- useTransition
- useChain
- useSpringValue
- Parallax
- ParallaxLayer
- useInView
- useScroll
- useResize
- useReducedMotion
- useIsomorphicLayoutEffect
- Imperative API
- SpringRef
- SpringValue
- Controller
- Spring configs
- Interpolation
- Async animations
- Events

##### Facts

**Frameworks**
react, react-native

**Styling**
unstyled

**Weight**
medium

**Accessibility**
ok

**Maturity**
established

**License**
MIT

**Price**
Free

##### Pairs with

[@use-gesture](https://tastebase.ehsanulsiam.workers.dev/browse/use-gesture)[React Three Fiber](https://tastebase.ehsanulsiam.workers.dev/browse/r3f)

##### Alternatives

[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

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

const styles = useSpring({
  opacity: isVisible ? 1 : 0,
  y: isVisible ? 0 : 24,
})

<animated.div style={styles}>{children}</animated.div>
```

https://www.react-spring.dev/examples

Loading website

[Visit](https://www.react-spring.dev/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
