Skip to content

Commit ec3485b

Browse files
committed
Add README
1 parent 4229b31 commit ec3485b

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
11
# React Native Animated SpinKit
22

33
A pure JavaScript port of [SpinKit](https://github.com/tobiasahlin/SpinKit) for React Native.
4+
5+
![](demo.gif)
6+
7+
## Why Another Port?
8+
9+
SpinKit is a popular library that provides a set of loading indicators on the web and has been ported to other platforms, including React Native ([react-native-spinkit](https://github.com/maxs15/react-native-spinkit)). But since `react-native-spinkit` is a native module, it requires extra native dependencies and can't be used in [Expo](https://expo.io) projects without ejecting.
10+
11+
This library is a pure JavaScript port of SpinKit implemented with the [Animated](https://facebook.github.io/react-native/docs/animated) API.
12+
13+
## Installation
14+
15+
```sh
16+
yarn add react-native-animated-spinkit
17+
```
18+
19+
or
20+
21+
```sh
22+
npm install react-native-animated-spinkit
23+
```
24+
25+
## Usage
26+
27+
```js
28+
import { Plane } from 'react-native-animated-spinkit'
29+
30+
function App() {
31+
return (
32+
<View style={styles.container}>
33+
<Plane size={48} color="#FFF">
34+
</View>
35+
)
36+
}
37+
```
38+
39+
## Props
40+
41+
Inherits [View Props](https://facebook.github.io/react-native/docs/view#props)
42+
43+
### size
44+
45+
> `?number` | defaults to `48`
46+
47+
Width and height of the spinner
48+
49+
### color
50+
51+
> `?string` | defaults to `#000`
52+
53+
Color of the spinner
54+
55+
## Spinners
56+
57+
All the spinners from [SpinKit](https://github.com/tobiasahlin/SpinKit) have been ported.
58+
59+
- `<Plane />`
60+
- `<Chase />`
61+
- `<Bounce />`
62+
- `<Wave />`
63+
- `<Pulse />`
64+
- `<Flow />`
65+
- `<Swing />`
66+
- `<Circle />`
67+
- `<CircleFade />`
68+
- `<Grid />`
69+
- `<Fold />`
70+
- `<Wander />`
71+
72+
## Example
73+
74+
To run the example project, follow these steps:
75+
76+
- Clone the repo
77+
- Run these commands
78+
79+
```sh
80+
yarn
81+
cd example
82+
yarn && yarn start
83+
```

demo.gif

1.46 MB
Loading

0 commit comments

Comments
 (0)