Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-spring

> 前端框架
Open source

✌️ A spring physics based React animation library

29.1K stars0 likes2 views
WebsiteGitHub

About

✌️ A spring physics based React animation library


react-spring

A spring-physics first animation library
giving you flexible tools to confidently cast your ideas



react-spring is a cross-platform spring-physics first animation library.

It's as simple as:

javascript
const styles = useSpring({
  from: {
    opacity: 0
  },
  to: {
    opacity: 1
  }
})

<animated.div style={styles} />

Just a small bit about us:

  • Cross-Platform: We support react-dom and react-three-fiber.
  • Versatile: Be declarative with your animations or if you prefer, imperative.
  • Spring-Physics First: By default animation use springs for fluid interactivity, but we support durations with easings as well.

There's a lot more to be had! Give it a try and find out.

Getting Started

⚡️ Jump Start

bash
# Install the target you need
npm install @react-spring/web
# or, for react-three-fiber
npm install @react-spring/three
javascript
import { animated, useSpring } from '@react-spring/web'

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

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

It's as simple as that to create scroll-in animations when value of isVisible is toggled.

📖 Documentation and Examples

More documentation on the project can be found here.

Pages contain their own examples which you can check out there, or open in codesandbox for a more in-depth view!


📣 What others say

Used by

And many others...

Backers

Thank you to all our backers! 🙏 If you want to join them here, then consider contributing to our Opencollective.

Contributors

This project exists thanks to all the people who contribute.

Issues· 74 open

View all issuesOpen on GitHub
  • #2076

    Dependency Dashboard

    Updated Sep 30, 2026
  • #2522

    RFC: Reject unknown top-level props in spring hooks

    type: RFCrelease: majorUpdated Sep 25, 2026
  • #1586

    three and web are incompatible

    kind: bugarea: threearea: webrelease: majorUpdated Sep 25, 2026
  • #2541

    Remove `any` from public types

    kind: requestarea: typescriptrelease: majorUpdated Jun 12, 2026
  • #2540

    useTransition API rewrite

    kind: requestarea: corerelease: majorUpdated Jun 11, 2026
  • #2542

    Physics-level spring coupling

    kind: requestarea: coreUpdated Jun 11, 2026
  • #1826

    [feat]: Create an animation abstraction for spring and gesture

    kind: requestUpdated Jun 11, 2026
  • #9

    FLIP-style animations

    kind: requestUpdated Jun 11, 2026
  • #2374

    [bug]: SpringValue.set doesn't schedule update to interpolation on first render

    kind: bugarea: corerelease: majorUpdated Jun 11, 2026
  • #2204

    [bug]: Immediate does not work when to is an array

    kind: bugarea: corerelease: majorUpdated Jun 11, 2026

> Tags

TypeScriptanimation-libraryreactreact-springspring-physics

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架