0.1.8 • Published 6 years ago

react-loading-spinkit v0.1.8

Weekly downloads
12
License
MIT
Repository
github
Last release
6 years ago

react-loading-spinkit

npm version

npm.io

this component base on react-spinkit, but more convenient

Required Knowledge

must add css-loader and style-loader in webpack config file, you can look this file

Installation

npm install --save react-loading-spinkit

Usage

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Loading from 'react-loading-spinkit';

class App extends Component {
  render() {
    return (
      <div style={{ height: '100vh', width: '100vw' }}>
        <Loading show={true} />
      </div>
    );
  }
}

ReactDOM.render(
  <App />,
  document.querySelector('.app'),
);

Props

NameTypeDefaultDescription
classNamestringadd a custom classname to the outer div
colorstring'#5282ef'programmatically set the color of the spinners; this can either be a hex value or a color word.
fadeInstringset the time before the spinner fades in.
heightunion: string number'100%'loading overlay's height
namestringspecify spinner to use (defaults to line-scale-pulse-out-rapid).
overrideSpinnerClassNamestringchange the default sk-spinner className.
showboolfalsecontrol loading show status
widthunion: string number'100%'loading overlay's width