1.0.0 • Published 3 years ago

shapla-react-spinner v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Shapla React Spinner

A loading spinner component based on Material Design Lite Spinner for React

Table of contents

Installation

npm install --save shapla-react-spinner

Usage

Styles

with Sass:

import 'shapla-react-spinner/src/index.scss';

with CSS:

import 'shapla-react-spinner/dist/spinner.css';

Javascript Instantiation

import React from 'react';
import Spinner from 'shapla-react-spinner';
 
class MyApp extends React.Component {
  render() {
    return (
      <Spinner active={this.state.active} single={true} showText={true}/>
    );
  }
}

Props

PropertyTypeRequiredDefaultDescription
activeBooleannotrueSpinner will be shown only when active value is true
singleBooleannofalseIf set true, only primary color will be shown for all layers.
showTextBooleannofalseIf set true, Loading... text will be show beside spinner.
loadingTextStringnoLoading...Loading text
positionStringnofixedValue can be fixed, absolute, or static.
sizeStringnodefaultValue can be default, small, or medium or large.
1.0.0

3 years ago