1 | # [React](http://facebook.github.io/react/)-spinner
|
2 |
|
3 | Zero configuration loading spinner.
|
4 |
|
5 | [Live demo](https://rawgit.com/chenglou/react-spinner/master/example/index.html) from the example folder.
|
6 |
|
7 | ## install
|
8 |
|
9 | Bower:
|
10 | ```sh
|
11 | bower install react-spinner
|
12 | ```
|
13 |
|
14 | Npm:
|
15 | ```sh
|
16 | npm install react-spinner
|
17 | ```
|
18 |
|
19 | Plain old script tag:
|
20 | ```html
|
21 | <script src="path/to/react-spinner/index.js"></script>
|
22 | ```
|
23 |
|
24 | (Compatible with CommonJS, e.g. Browserify.)
|
25 |
|
26 | The CSS file:
|
27 | ```html
|
28 | <link rel="stylesheet" type="text/css" href="path/to/react-spinner.css">
|
29 | ```
|
30 |
|
31 | The spinner
|
32 |
|
33 | ## API
|
34 |
|
35 | ### <Spinner />
|
36 | Adds the spinner, which centers itself based on its container's dimensions. If those are not predefined, simply manually center it by adding more style rules to the exposed `.react-spinner` class [here](https://github.com/chenglou/react-spinner/blob/master/react-spinner.css#L1-L7).
|
37 |
|
38 | You can also override the `.react-spinner`'s `width` and `height` if you want a bigger or smaller spinner. Everything resizes correctly.
|
39 |
|
40 | ## License
|
41 |
|
42 | MIT.
|