1.0.2 • Published 4 years ago

react-multicolor-loading-bar v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

react-colored-loading-bar

Here is the Demo.

Installation

npm install --save react-multicolor-loading-bar

Example Usage

import React from 'react'
import Loadingbar from 'react-multicolor-loading-bar'

const App = () => {
  return (
    <div>
      <Loadingbar
        colors={[darkBlue, darkOrange, darkBlue, lightOrange]}
        height={5}
        cycleDurationInMs={200}
        positionAtTop={true}
      ></Loadingbar>
    </div>
  )
}

export default App

Props

Below are the props you can pass to the Component to customize its behaviour.

PropTypeDefaultdescription
colorsstring[]-Colors codes to fill the loading bar with
heightnumber-Height of the bar
cycleDurationInMsnumber-How soon you want to the bar to complete one cycle
positionAtTopboolean-Whether to stick the bar at the top of the page

License

ISC licensed