UNPKG

1.01 kBMarkdownView Raw
1# [React](http://facebook.github.io/react/)-spinner
2
3Zero 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
9Bower:
10```sh
11bower install react-spinner
12```
13
14Npm:
15```sh
16npm install react-spinner
17```
18
19Plain 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
26The CSS file:
27```html
28<link rel="stylesheet" type="text/css" href="path/to/react-spinner.css">
29```
30
31The spinner
32
33## API
34
35### <Spinner />
36Adds 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
38You 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
42MIT.