Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmndrs/react-spring
✌️ A spring physics based React animation library
https://github.com/pmndrs/react-spring
animation-library react react-spring spring-physics springs
Last synced: 3 days ago
JSON representation
✌️ A spring physics based React animation library
- Host: GitHub
- URL: https://github.com/pmndrs/react-spring
- Owner: pmndrs
- License: mit
- Created: 2018-03-07T15:39:32.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-12-04T18:53:10.000Z (8 days ago)
- Last Synced: 2024-12-04T20:48:47.200Z (7 days ago)
- Topics: animation-library, react, react-spring, spring-physics, springs
- Language: TypeScript
- Homepage: http://www.react-spring.dev/
- Size: 643 MB
- Stars: 28,275
- Watchers: 192
- Forks: 1,194
- Open Issues: 114
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-react-cn - react-spring - Spring-physics based animation library for React applications (Uncategorized / Uncategorized)
- awesome-game-engine-dev - React-Spring - Spring physics based React animation library. (Libraries / JavaScript)
- awesome-github-repos - pmndrs/react-spring - ✌️ A spring physics based React animation library (TypeScript)
- awesome-learning-resources - react-spring - Spring-physics based animation library for React applications (Uncategorized / Uncategorized)
- awesome-whatthefar - react-spring
- awesome-github-star - react-spring
- awesome-list - react-spring
- awesome-repos - react-spring
- awesome-list - react-spring
- best-of-react - GitHub - 9% open · ⏱️ 26.05.2024): (Animations)
- awesome-react-three-fiber - react-spring
- awesome-react - react-spring - A spring physics based React animation library ` 📝 7 days ago` (React [🔝](#readme))
- awesome-react - react-spring - A spring physics based React animation library (**Awesome React** [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) / React)
- StarryDivineSky - pmndrs/react-spring - Physics First 动画库。 (前端开发框架及项目 / 其他_文本生成、文本对话)
- awesome-starts - pmndrs/react-spring - ✌️ A spring physics based React animation library (TypeScript)
- awesome - pmndrs/react-spring - ✌️ A spring physics based React animation library (TypeScript)
README
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:
```jsx
const styles = useSpring({
from: {
opacity: 0
},
to: {
opacity: 1
}
})```
Just a small bit about us:
- **Cross-Platform**: We support `react-dom`, `react-native`, `react-three-fiber`, `react-konva` & `react-zdog`.
- **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
```shell
# Install the entire library
npm install react-spring
# or just install your specific target (recommended)
npm install @react-spring/web
``````jsx
import { animated, useSpring } from '@react-spring/web'const FadeIn = ({ isVisible, children }) => {
const styles = useSpring({
opacity: isVisible ? 1 : 0,
y: isVisible ? 0 : 24,
})return {children}
}
```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](https://www.react-spring.io).
Pages contain their own [examples](https://react-spring.io/hooks/use-spring#demos) which you can check out there, or [open in codesandbox](https://codesandbox.io/s/github/pmndrs/react-spring/tree/main/demo/src/sandboxes/card) for a more in-depth view!
---
## 📣 What others say
## Used by
And [many others...](https://github.com/pmndrs/react-spring/network/dependents)
## Backers
Thank you to all our backers! 🙏 If you want to join them here, then consider contributing to our [Opencollective](https://opencollective.com/react-spring).
## Contributors
This project exists thanks to all the people who contribute.