✌️ A spring physics based React animation library
Installations
npm install @react-spring/web
Developer
Developer Guide
Module System
CommonJS, ESM
Min. Node Version
Typescript Support
Yes
Node Version
20.17.0
NPM Version
10.8.2
Statistics
28,261 Stars
3,532 Commits
1,191 Forks
192 Watching
11 Branches
203 Contributors
Updated on 28 Nov 2024
Languages
TypeScript (98.84%)
JavaScript (0.6%)
Shell (0.36%)
CSS (0.12%)
HTML (0.09%)
Total Downloads
Cumulative downloads
Total Downloads
184,445,303
Last day
-4.3%
352,159
Compared to previous day
Last week
2.9%
1,864,379
Compared to previous week
Last month
9.4%
7,890,007
Compared to previous month
Last year
43.9%
79,642,073
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
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:
1const styles = useSpring({ 2 from: { 3 opacity: 0 4 }, 5 to: { 6 opacity: 1 7 } 8}) 9 10<animated.div style={styles} />
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
1# Install the entire library 2npm install react-spring 3# or just install your specific target (recommended) 4npm install @react-spring/web
1import { animated, useSpring } from '@react-spring/web' 2 3const FadeIn = ({ isVisible, children }) => { 4 const styles = useSpring({ 5 opacity: isVisible ? 1 : 0, 6 y: isVisible ? 0 : 24, 7 }) 8 9 return <animated.div style={styles}>{children}</animated.div> 10}
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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
12 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 8/22 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/bundle-size.yml:1
- Warn: no topLevel permission defined: .github/workflows/checks.yml:1
- Warn: no topLevel permission defined: .github/workflows/experimental.yml:1
- Warn: no topLevel permission defined: .github/workflows/nightly.yml:1
- Warn: no topLevel permission defined: .github/workflows/tests.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bundle-size.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/bundle-size.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bundle-size.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/bundle-size.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/bundle-size.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/bundle-size.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/checks.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/checks.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/checks.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/checks.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/checks.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/checks.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/experimental.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/experimental.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experimental.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/experimental.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/experimental.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/experimental.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/nightly.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/nightly.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/nightly.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/nightly.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:244: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:246: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:135: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:138: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:200: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:203: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:214: update your workflow using https://app.stepsecurity.io/secureworkflow/pmndrs/react-spring/tests.yml/main?enable=pin
- Info: 0 out of 26 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 6 third-party GitHubAction dependencies pinned
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 19 are checked with a SAST tool
Reason
34 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986 / GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-353f-5xf4-qw67
- Warn: Project is vulnerable to: GHSA-c24v-8rfc-w8vw
- Warn: Project is vulnerable to: GHSA-8jhw-289h-jh2g
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
Score
4.1
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More