Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-spinner-overlay

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-spinner-overlay

A collection of react loading spinners and loading spinners' overlays

  • 0.1.33
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-9.7%
Maintainers
1
Weekly downloads
 
Created
Source

React Spinner Overlay

This project was bootstrapped with Create React App.

スクリーンショット 2021-11-16 22 44 19

🚀 Demo

Demo page


💫 Installation

yarn:

yarn add react-spinner-overlay

npm:

npm install react-spinner-overlay

📌 Usage

There are mainly two usages. You have to prepare loading boolean state or boolean variables.

A. Pass loading(boolean) prop to spinner

import { CircleSpinnerOverlay, FerrisWheelSpinner } from 'react-spinner-overlay'

...

  const [loading, setLoading] = useState<boolean>(true)

...

  return (
    <>
      <FerrisWheelSpinner loading={loading} size={28} />
      <CircleSpinnerOverlay
        loading={loading} 
       overlayColor="rgba(0,153,255,0.2)"
      />
    </>
  )

B. Switch components


import { FerrisWheelSpinner } from 'react-spinner-overlay'

...

  return (
    <>
      {loading
        ? <FerrisWheelSpinner loading={loading} color="#FF7626" />
        : <p>loaded!</p>
      }
    </>
  )

🎗 Props of each spinner/overlay

CircleSpinner

proptypedefaultnote
loadingbooleantrue
sizenumber42px
colorstring#00ced1
innerBorderWidthnumber6
outerBorderWidthnumber1
innerBorderOpacitynumber1
outerBorderOpacitynumber1

LineLoader

proptypedefaultnote
loadingbooleantrue
widthnumber60px
heightnumber4px
colorstring#00ced1
bgOpacitynumber0.3
borderRadiusnumber10px

RingSpinner

proptypedefaultnote
loadingbooleantrue
sizenumber42px
colorstring#00ced1
borderWidthnumber2px

FerrisWheelSpinner

proptypedefaultnote
loadingbooleantrue
sizenumber32px
colorstring#00ced1

WindmillSpinner

proptypedefaultnote
loadingbooleantrue
sizenumber40px
colorstring#00ced1
borderWidthnumber4px
borderHeightnumber10px
borderRadiusnumber8px

RouletteSpinner

proptypedefaultnote
loadingbooleantrue
sizenumber32px
colorstring#00ced1

DartsSpinner

proptypedefaultnote
loadingbooleantrue
sizenumber48px
colorstring#00ced1

DotLoader

proptypedefaultnote
loadingbooleantrue
sizenumber12px
colorstring#00ced1
betweennumber3px

BounceLetterLoader

proptypedefaultnote
loadingbooleantrue
lettersstringLoading...
colorstring#00ced1
animationDurationnumber2second

Overlay

All overlays (BounceLetterLoaderOverlay, CircleSpinnerOverlay, DartsSpinnerOverlay, DotLoaderOverlay, FerrisWheelSpinnerOverlay, LineLoaderOverlay, RouletteSpinnerOverlay, RingSpinnerOverlay, WindmillSpinnerOverlay) have their own spinner props, plus the following props.

proptypedefault
overlayColorstringrgb(255 255 255 / 80%)
messagestring or JSX.Element
zIndexnumber500

Keywords

FAQs

Package last updated on 23 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc