Retour au classement

pmndrs/react-spring

TypeScriptreact-spring.dev

✌️ A spring physics based React animation library

animation-libraryspring-physicsreactspringsreact-spring
Croissance des étoiles
Étoiles
29.1k
Forks
1.2k
Croissance hebdomadaire
Issues
71
10k20k
mars 2018déc. 2020oct. 2023juil. 2026
Artefactsnpmnpm install react-spring
README


react-spring

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


Chat on Discord


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

It's as simple as:

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

# Install the target you need
npm install @react-spring/web
# or, for react-three-fiber
npm install @react-spring/three
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.

Dépôts similaires
microsoft/fast

The adaptive interface system for modern web experiences.

TypeScriptnpmOtherdesign-systemsdesign-architecture
fast.design
9.7k632
aholachek/react-flip-toolkit

A lightweight magic-move library for configurable layout transitions

TypeScriptnpmMIT Licenseflip-animationsreactjs
4.2k139
willowtreeapps/spruce-android

Spruce Animation Library

JavaMavenMIT Licenseandroidanimation
3.7k366
shoheiyokoyama/Gemini

Gemini is rich scroll based animation framework for iOS, written in Swift.

SwiftMIT Licenseswiftswift-library
youtube.com/watch
3.3k199
jogboms/flutter_spinkit

✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

DartMIT Licenseflutterflutter-plugin
3.1k322
OCNYang/Android-Animation-Set

:books: Android 所有动画系列详尽教程。 Explain all animations in Android.

JavaMavenApache License 2.0animationanimatorset
jianshu.com/p/0eb89d43eea4
3.1k509
merri-ment/lazy-line-painter

Lazy Line Painter - A Modern JS library for SVG path animation

JavaScriptnpmMIT Licensepath-animationjavascript
lazylinepainter.com
2k317
Martz90/vivify

Vivify is free CSS animation library.

CSSnpmMIT Licenseanimation-librarycss-animations
1.7k148
yysskk/SwipeMenuViewController

Swipe-based paging UI for iOS

SwiftMIT Licenseiosanimation-library
yysskk.github.io/SwipeMenuViewController/documentation/swipemenuviewcontroller/
1.3k129
triggerjs/trigger

A library for creating scroll-based animation with HTML attributes and CSS variables.

TypeScriptnpmMIT Licensecssjavascript
1.3k75
AntonTheDev/FlightAnimator

Advanced Natural Motion Animations, Simple Blocks Based Syntax

Swiftswift-libraryswift
58240