You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is a *set of simple, spring-physics based primitives* (as in building blocks) that should cover most of your UI related animation needs once plain CSS can't cope any longer. Forget easings, durations, timeouts and so on as you fluidly move data from one state to another. This isn't meant to give each and every problem a specific solution, but rather to give you tools flexible enough to confidently cast your ideas into moving interfaces, or introduce motion to the static.
17
+
31
18
<br />
32
19
33
-
[](https://travis-ci.org/drcmda/react-spring)[](https://badge.fury.io/js/react-spring)[](https://spectrum.chat/react-spring) <spanclass="badge-patreon"><ahref="https://www.patreon.com/0xca0a"title="Donate to this project using Patreon"><imgsrc="https://img.shields.io/badge/patreon-donate-yellow.svg"alt="Patreon donate button" /></a></span> [](#backers)[](#sponsors)
20
+
[](https://travis-ci.org/drcmda/react-spring)[](https://badge.fury.io/js/react-spring)[](https://spectrum.chat/react-spring) <spanclass="badge-patreon"><ahref="https://www.patreon.com/0xca0a"title="Donate to this project using Patreon"><imgsrc="https://img.shields.io/badge/patreon-donate-yellow.svg"alt="Patreon donate button" /></a></span> [](#backers)[](#sponsors)
21
+
22
+
### Installation
34
23
35
24
npm install react-spring
36
25
37
-
React-spring is a spring physics based animation library for React.
26
+
### Documentation and Examples
27
+
28
+
Full documentation and examples here: **[react-spring.surge.sh](https://react-spring.surge.sh/)**
29
+
30
+
---
31
+
32
+
### Why springs and not durations
33
+
34
+
The most basic principle you will be working with is called a `spring`. A spring *does not have a curve, it does not have a duration, it is physics based*! Think of a weight attached to a spring:
For a more detailed explanation read [Why React needed yet another animation library](https://medium.com/@drcmda/why-react-needed-yet-another-animation-library-introducing-react-spring-8212e424c5ce).
40
+
Let the weight loose and it rushes down, coming to rest when the force is overcome. Yank the spring up and it will expend its energy and move up according to its momentum. Time based animation on the other hand would have it drop down in an arbitrary timeframe, say 2 seconds. Pull up mid-air and it would stop naively, then move back 2 seconds again. No matter which curve you choose, it will never look natural.
40
41
41
-
Full documentation and examples here: [react-spring.surge.sh](https://react-spring.github.io)
42
+
*Durations and easings are the number one reason UI animation is hard*, and usually looks bad. We are so used to it that we don't question it any longer. We think it is just the way it is when we have to deal with curves, easings, time waterfalls, not to mention getting this all in sync.
42
43
43
-
# What others say
44
+
Springs change that, they make animation easy and approachable, everything you do with them is fluid by default. Watch the next couple of minutes of [this video](https://www.youtube.com/embed/1tavDv5hXpo?controls=0&start=370) in which Cheng Lou (the author of react-motion) explains it perfectly.
@@ -56,28 +59,39 @@ Full documentation and examples here: [react-spring.surge.sh](https://react-spri
56
59
57
60
And [many others](https://github.com/drcmda/react-spring/network/dependents) ...
58
61
59
-
# Funding
62
+
##Funding
60
63
61
-
If you like this project, consider helping out, ... all contributions are welcome as well as donations to [Opencollective](https://opencollective.com/react-spring) or [Patreon](https://www.patreon.com/0xca0a). You can make one off donations in crypto to 36fuguTPxGCNnYZSRdgdh6Ea94brCAjMbH (BTC).
64
+
If you like this project, please consider helping out. All contributions are welcome as well as donations to [Opencollective](https://opencollective.com/react-spring), or in crypto: 36fuguTPxGCNnYZSRdgdh6Ea94brCAjMbH (BTC) or 0x6E3f79Ea1d0dcedeb33D3fC6c34d2B1f156F2682 (ETH).
62
65
63
-
## Contributors
66
+
You can also support this project by becoming a sponsor. Your logo will show up here with a link to your website.
64
67
65
-
This project exists thanks to all the people who contribute.
Support this project by [becoming a sponsor](https://opencollective.com/react-spring#sponsor). Your logo will show up here with a link to your website.
93
+
This project exists thanks to all the people who contribute.
0 commit comments