|
1 | | -# react-native-loader-kit |
| 1 | +<h1 align="center"> |
| 2 | + <div> |
| 3 | + React Native Loader Kit |
| 4 | + </div> |
| 5 | + <div> |
| 6 | + <a href="https://www.npmjs.com/package/react-native-loader-kit" target="_blank"> |
| 7 | + <img src="https://img.shields.io/npm/dw/react-native-loader-kit" /> |
| 8 | + </a> |
2 | 9 |
|
3 | | -✳️Purely native loader indicators for React Native✳️ |
| 10 | + <a href="https://www.npmjs.com/package/react-native-loader-kit" target="_blank"> |
| 11 | + <img src="https://img.shields.io/npm/v/react-native-loader-kit" /> |
| 12 | + </a> |
4 | 13 |
|
5 | | -## Installation |
| 14 | + <a href="https://github.com/maitrungduc1410/react-native-loader-kit" target="_blank"> |
| 15 | + <img src="https://img.shields.io/github/license/maitrungduc1410/react-native-loader-kit" /> |
| 16 | + </a> |
6 | 17 |
|
7 | | -```sh |
8 | | -npm install react-native-loader-kit |
9 | | -``` |
| 18 | + <a href="https://github.com/maitrungduc1410/react-native-loader-kit" target="_blank"> |
| 19 | + <img src="https://img.shields.io/github/stars/maitrungduc1410/react-native-loader-kit?style=social" /> |
| 20 | + </a> |
| 21 | + |
| 22 | + </div> |
| 23 | + <br> |
| 24 | + <div align="center"> |
| 25 | + <img src="./images/demo_android.gif" style="margin-right: 30px;" /> |
| 26 | + <img src="./images/demo_ios.gif" /> |
| 27 | + </div> |
| 28 | + <h2 align="center"> |
| 29 | + If you like this project, encourage me by giving a ⭐️. Happy hacking |
| 30 | + </h2> |
| 31 | +</h1> |
10 | 32 |
|
11 | | -## Usage |
| 33 | +# Table of Contents |
| 34 | +1. [Installation](#Installation) |
| 35 | +2. [Usage](#usage) |
| 36 | +3. [List animations](#list-animations) |
| 37 | +4. [Demo](#demo) |
12 | 38 |
|
13 | | -```js |
14 | | -import { LoaderKitView } from "react-native-loader-kit"; |
| 39 | +# Installation |
| 40 | +With npm: |
| 41 | +`$ npm install react-native-loader-kit --save` |
15 | 42 |
|
16 | | -// ... |
| 43 | +With yarn: |
| 44 | +`$ yarn add react-native-loader-kit` |
17 | 45 |
|
18 | | -<LoaderKitView color="tomato" /> |
| 46 | +## Extra setup step for iOS |
| 47 | +Run the following command to setup for iOS: |
19 | 48 | ``` |
| 49 | +cd ios && pod install |
| 50 | +``` |
| 51 | +# Usage |
| 52 | +```js |
| 53 | +import LoaderKit from 'react-native-loader-kit' |
20 | 54 |
|
21 | | -## Contributing |
22 | | - |
23 | | -See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. |
24 | | - |
25 | | -## License |
| 55 | +<LoaderKit |
| 56 | + style={{ width: 50, height: 50 }} |
| 57 | + name={'BallPulse'} // Optional: see list of animations below |
| 58 | + size={50} // Required on iOS |
| 59 | + color={'red'} // Optional: color can be: 'red', 'green',... or '#ddd', '#ffffff',... |
| 60 | +/> |
| 61 | +``` |
| 62 | +> Note: size is required for iOS and should equal to `width` and `height` |
| 63 | +# List animations |
| 64 | +As shown in the demo above, animations are as follows: |
| 65 | +## Default animations (both Android and iOS) |
| 66 | +```json |
| 67 | + '1': 'BallPulse', |
| 68 | + '2': 'BallGridPulse', |
| 69 | + '3': 'BallClipRotate', |
| 70 | + '4': 'SquareSpin', |
| 71 | + '5': 'BallClipRotatePulse', |
| 72 | + '6': 'BallClipRotateMultiple', |
| 73 | + '7': 'BallPulseRise', |
| 74 | + '8': 'BallRotate', |
| 75 | + '9': 'CubeTransition', |
| 76 | + '10': 'BallZigZag', |
| 77 | + '11': 'BallZigZagDeflect', |
| 78 | + '12': 'BallTrianglePath', |
| 79 | + '13': 'BallScale', |
| 80 | + '14': 'LineScale', |
| 81 | + '15': 'LineScaleParty', |
| 82 | + '16': 'BallScaleMultiple', |
| 83 | + '17': 'BallPulseSync', |
| 84 | + '18': 'BallBeat', |
| 85 | + '19': 'LineScalePulseOut', |
| 86 | + '20': 'LineScalePulseOutRapid', |
| 87 | + '21': 'BallScaleRipple', |
| 88 | + '22': 'BallScaleRippleMultiple', |
| 89 | + '23': 'BallSpinFadeLoader', |
| 90 | + '24': 'LineSpinFadeLoader', |
| 91 | + '25': 'TriangleSkewSpin', |
| 92 | + '26': 'Pacman', |
| 93 | + '27': 'BallGridBeat', |
| 94 | + '28': 'SemiCircleSpin' |
| 95 | +``` |
| 96 | +## iOS extra animations |
| 97 | +```json |
| 98 | + '29': 'BallRotateChase', |
| 99 | + '30': 'Orbit', |
| 100 | + '31': 'AudioEqualizer', |
| 101 | + '32': 'CircleStrokeSpin', |
| 102 | + '33': 'BallDoubleBounce' |
| 103 | +``` |
| 104 | +# Demo |
| 105 | +A fully working demo is located at [example folder](./example/App.js) |
26 | 106 |
|
27 | | -MIT |
| 107 | +# Thanks |
| 108 | +Big thanks to [81813780](https://github.com/81813780/AVLoadingIndicatorView) and [ninjaprox](https://github.com/ninjaprox/NVActivityIndicatorView) for their great works |
0 commit comments