1
- # React Native CSS Animations
2
1
3
- Ready-to-use CSS Animation presets for React Native Reanimated.
2
+ <img width =" 1100 " alt =" header " src =" https://github.com/user-attachments/assets/f007398e-68f6-446a-8580-8a0fb3fab57a " />
3
+
4
+ Ready-to-use CSS Animation presets for React Native Reanimated
4
5
5
6
## Installation
6
7
7
- ```
8
- yarn add [react-native-reanimated@next]( https://github.com/software-mansion/react-native-reanimated)
8
+ < pre >
9
+ yarn add < a href = " https://github.com/software-mansion/react-native-reanimated " target = " _blank " >react-native-reanimated@next</ a >
9
10
yarn add react-native-css-animations
10
- ```
11
+ </ pre >
11
12
12
13
## Usage
13
14
14
15
### Spin
15
16
17
+ Add ` spin ` style object to an ` Animated ` component add a linear spinning animation. Great for loaders.
18
+
19
+ <img src =" https://github.com/user-attachments/assets/d3a87650-83f4-476b-bf85-832a3a2d0fea " alt =" Spin animation demo " align =" right " width =" 350 " />
20
+
16
21
``` typescript
17
22
import { spin } from ' react-native-css-animations' ;
18
23
import Animated from ' react-native-reanimated' ;
19
24
20
25
function App() {
21
26
return (
22
- < Animated .View style = {[styles .box , spin ]}/>
27
+ < Animated .View style = {[styles .spinner , spin ]}/>
23
28
)
24
29
}
25
30
```
26
31
27
32
### Ping
28
33
34
+ Add `ping` style object to an `Animated` component to make the element scale and fade. Great for attention grabbing elements like notifications.
35
+
36
+ <img src="https:// github.com/user-attachments/assets/51c604b4-621b-4821-ab9a-f289f15e07ae" alt="Ping animation demo" align="right" width="350" />
37
+
29
38
` ` ` typescript
30
39
import { ping } from 'react-native-css-animations';
31
40
import Animated from 'react-native-reanimated';
@@ -39,6 +48,10 @@ function App() {
39
48
40
49
### Pulse
41
50
51
+ Add ` pulse ` style object to an ` Animated ` component to make it fade in and out . Great for skeleton loaders .
52
+
53
+ < img src = " https://github.com/user-attachments/assets/d36924b1-f4f8-4bd4-b3dd-a298d3b2f4b6" alt = " Pulse animation demo" align = " right" width = " 350" / >
54
+
42
55
` ` ` typescript
43
56
import { pulse } from 'react-native-css-animations';
44
57
import Animated from 'react-native-reanimated';
@@ -52,6 +65,10 @@ function App() {
52
65
53
66
### Bounce
54
67
68
+ Add ` bounce ` style object to an ` Animated ` component to make it bounce up and down . Great for scroll down indicators .
69
+
70
+ < img src = " https://github.com/user-attachments/assets/81e75ed0-b7ec-4f56-a06a-c593a626cb39" alt = " Bounce animation demo" align = " right" width = " 350" / >
71
+
55
72
` ` ` typescript
56
73
import { bounce } from 'react-native-css-animations';
57
74
import Animated from 'react-native-reanimated';
0 commit comments