1.0.1 • Published 3 years ago

@sakit-sa/react-spinner v1.0.1

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

@sakit-sa/react-spinner

Simple, easy spinner for React

NPM JavaScript Style Guide

Spinner

Spinner gif

Live Playground

For examples of the react-spinner in action, go to https://abdilar.github.io/react-spinner.

OR

To run that demo on your own computer:

Getting Started

Install

npm install @sakit-sa/react-spinner

Usage

import React from 'react';

import Spinner, {POSITIONS, MODE, NAME} from '@sakit-sa/react-spinner';
import '@sakit-sa/react-spinner/dist/index.css';

const App = () => (
  <Spinner
    isLoading={true}
    name={NAME.PUFF}
    mode={MODE.INSIDE}
    position={POSITIONS.CENTER}
  />
);

Props

NameTypeDefaultDescription
isLoadingbooleanfalseBoolean value to control whether the spinner is shown.
namestringuikitSpecifies the name of the spinner (name includes: uikit, puff, grid, oval, rings, ball-triangle, tail-spin, three-dots).
modestringinsideSpecifies the mode of the spinner (mode includes: inside, full).
classNameobject{}Apply a className to the control
overlaybooleanfalseBoolean value to control whether the spinner has an overlay.
blurbooleanfalseBoolean value to set the blur of the spinner background.
darkbooleanfalseBoolean value to set the darkness of the spinner background.
idstringspinner-[randomNumber(10000)]The unique identifier for the component.
rationumber1Specifies the size of the spinner.
colorstring''Specifies the color of the spinner (color format: #ff00bb, rgb(124, 100, 0), rgb(100%, 2.5%, 0%), rgba(255, 0, 0, 0.5), hsl(140, 2%, 50%), hsla(140, 2%, 50%, 0.5)).
positionstringCENTERSpecifies the position of the spinner (position includes: BOTTOM, CENTER, LEFT, RIGHT, TOP).

className Token

wrapper spinner

See examples for more information (go to https://abdilar.github.io/react-spinner/?path=/story/theme-prop--class-name)

License

MIT © Saeed Abdilar