React Spinners in CSS
Currently react-spinners package provides spinner implementation with CSS-in-JS ported via halogen. With CSP headers we need to add unsafe-inline in styles or provide nonce and sha-256 based protection. This is not ideal for most of the use cases, and incorrect implementation of nonce can leave css injection unprotected. This package is an attempt to migrate all spinners provided in that package to CSP complaint react component.
Following have been ported so far:
- CircleLoader
- BarLoader
- PacmanLoader
Other loader migration is in progress. Roadmap:
- V1.0.0 will have all loaders migrated
Demo: React Spinners Demo
Orignal Author for react-spinners:
Installation
NPM
npm install react-spinners-css
YARN
yarn add react-spinners-css
Usage
import {CircleLoader} from 'react-spinners-css';
import 'react-spinners-css/dist/styles.css';