2.1.1 • Published 2 years ago

@mdhnpm/react-cube-loading-spinner v2.1.1

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

React Cube Loading Spinner

Super cool configurable cube loading spinner for react. There are 4 configurable options. With TypeScript support.

propspurpose
mainColorMain color of the cube. It takes any CSS color values (color name, hex, rgb).
secondaryColorSecondary color of the cube
spinnerInnerHeightHeight of the inner spinner in pixel. The dimension will be spinnerInnerHeight times 3.
spinnerSpeedSpeed of the spinner rotation in second (e.g. 1.5).

Usage

Import the module.

import { CubeLoadingSpinner } from "@mdhnpm/cube-loading-spinner";

We can configure the spinner. Note that when spinnerInnerHeight is 9, the dimension of the cube will be 27 x 27 x 27px.

<CubeLoadingSpinner
  mainColor="black"
  secondaryColor="gray"
  spinnerInnerHeight={9}
  spinnerSpeed={1.5}
/>

The props are optional. If you don't pass any prop, you can get a default spinner.

<CubeLoadingSpinner />

And this is what it looks like...

Enjoy 🤟💀🤟