1.9.1 • Published 3 years ago

react-spinners-kit v1.9.1

Weekly downloads
8,031
License
MIT
Repository
github
Last release
3 years ago

React Spinners Kit

npm version Build Status downloads license

A collection of loading spinners built with styled-components.

Imgur

Live Demo

🚀 Installation

Install react-spinners-kit using npm.

npm install --save react-spinners-kit

or if you prefer yarn

yarn add react-spinners-kit

👨🏻‍💻 Usage

import React from "react";
import ReactDOM from "react-dom";
import { PushSpinner } from "react-spinners-kit";

class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            loading: true,
        };
    }

    render() {
        const { loading } = this.state;
        return <PushSpinner size={30} color="#686769" loading={loading} />;
    }
}

ReactDOM.render(<App />, document.getElementById("root"));

📃 PropTypes and Default Props

  • Each spinner accepts a loading prop as a boolean.
  • The loading prop defaults to true.
  • The loader will not render anything if loading is false.
Spinnersize: numbercolor: stringfrontColor: stringbackColor: stringsizeUnit: string
BallSpinner40#00ff89--px
BarsSpinner40#00ff89--px
CircleSpinner30#fff--px
CubeSpinner25-#00ff89#686769px
DominoSpinner100#686769--px
FillSpinner20#686769--px
FireworkSpinner40#fff--px
FlagSpinner40#fff--px
GridSpinner40#fff--px
GuardSpinner40-#00ff89#686769px
HeartSpinner40#fff--px
ImpulseSpinner40-#00ff89#686769px
PulseSpinner40#fff--px
PushSpinner30#686769--px
SequenceSpinner40-#00ff89#686769px
SphereSpinner30#fff--px
SpiralSpinner40#00ff89#686769px
StageSpinner40#fff--px
SwapSpinner40#686769--px
WaveSpinner30#fff--px
ClapSpinner30-#00ff89#686769px
RotateSpinner45#00ff89--px
SwishSpinner40-#4b4c56#fffpx
GooSpinner55#fff--px
CombSpinner100#fff--px
PongSpinner60#4b4c56--px
RainbowSpinner50#fff--px
RingSpinner30#00ff89--px
HoopSpinner45#4b4c56--px
FlapperSpinner30#00ff89--px
MagicSpinner70#fff--px
JellyfishSpinner60#4b4c56--px
TraceSpinner70-#00ff89#4b4c56px
ClassicSpinner30#fff--px
MetroSpinner40#fff--px
WhisperSpinner50#fff#4b4c56#00ff89px

Development

You can also test the components locally by cloning this repo and doing the following steps:

Install dependencies from package.json:

npm install

Runs the app in the development mode. Open http://localhost:1234 to view it in the browser.

npm start

Run linter

npm run lint

💻 Contributing

  • Pull requests and ⭐ stars are always welcome
  • For bugs and feature requests, please create an issue
  • Lint and test your code

License

MIT