@@ -20,14 +20,12 @@ Add `spin` style object to an `Animated` component add a linear spinning animati
2020
2121<img src =" https://github.com/user-attachments/assets/d3a87650-83f4-476b-bf85-832a3a2d0fea " alt =" Spin animation demo " align =" right " width =" 275 " />
2222
23- ``` typescript
23+ ``` jsx
2424import { spin } from ' react-native-css-animations' ;
2525import Animated from ' react-native-reanimated' ;
2626
2727function App () {
28- return (
29- < Animated .View style = {[styles .spinner , spin ]}/>
30- )
28+ return < Animated .View style= {[styles .spinner , spin]} / > ;
3129}
3230```
3331
@@ -37,14 +35,12 @@ Add `ping` style object to an `Animated` component to make the element scale and
3735
3836<img src =" https://github.com/user-attachments/assets/51c604b4-621b-4821-ab9a-f289f15e07ae " alt =" Ping animation demo " align =" right " width =" 275 " />
3937
40- ` ` ` typescript
38+ ``` jsx
4139import { ping } from ' react-native-css-animations' ;
4240import Animated from ' react-native-reanimated' ;
4341
4442function App () {
45- return (
46- <Animated.View style={[styles.notification, ping]}/>
47- )
43+ return < Animated .View style= {[styles .notification , ping]} / > ;
4844}
4945```
5046
@@ -54,14 +50,12 @@ Add `pulse` style object to an `Animated` component to make it fade in and out.
5450
5551<img src =" https://github.com/user-attachments/assets/d36924b1-f4f8-4bd4-b3dd-a298d3b2f4b6 " alt =" Pulse animation demo " align =" right " width =" 275 " />
5652
57- ` ` ` typescript
53+ ``` jsx
5854import { pulse } from ' react-native-css-animations' ;
5955import Animated from ' react-native-reanimated' ;
6056
6157function App () {
62- return (
63- <Animated.View style={[styles.skeleton, pulse]}/>
64- )
58+ return < Animated .View style= {[styles .skeleton , pulse]} / > ;
6559}
6660```
6761
@@ -71,14 +65,28 @@ Add `bounce` style object to an `Animated` component to make it bounce up and do
7165
7266<img src =" https://github.com/user-attachments/assets/81e75ed0-b7ec-4f56-a06a-c593a626cb39 " alt =" Bounce animation demo " align =" right " width =" 275 " />
7367
74- ` ` ` typescript
68+ ``` jsx
7569import { bounce } from ' react-native-css-animations' ;
7670import Animated from ' react-native-reanimated' ;
7771
72+ function App () {
73+ return < Animated .View style= {[styles .arrow , bounce]} / > ;
74+ }
75+ ```
76+
77+ ## Alternative API
78+
79+ The following animations are also available in a form of React Native components.
80+
81+ ``` jsx
82+ import { Spin , Ping , Pulse , Bounce } from ' react-native-css-animations' ;
83+
7884function App () {
7985 return (
80- <Animated.View style={[styles.arrow, bounce]}/>
81- )
86+ < Bounce>
87+ < ArrowIcon / >
88+ < / Bounce>
89+ );
8290}
8391```
8492
0 commit comments