Simple overlay loader for React. Overlay on part of page or entire page
yarn add reactjs-overlay-loader
Or
npm install --save reactjs-overlay-loader
import React from "react";
import ReactOverlayLoader from "reactjs-overlay-loader";
const App = () => {
return (
<ReactjsOverlayLoader isActive>
The easiest way to use overlay
</ReactjsOverlayLoader>
);
};
import React from "react";
import ReactOverlayLoader from "reactjs-overlay-loader";
const App = () => {
return (
<div style={{ position: "relative" }}>
<ReactjsOverlayLoader
style={{
position: "absolute"
}}
isActive
>
The easiest way to use overlay
</ReactjsOverlayLoader>
</div>
);
};
import React from "react";
import ReactOverlayLoader from "reactjs-overlay-loader";
const App = () => {
return (
<ReactjsOverlayLoader
loaderContent={<span style={{ color: "#ffffff" }}> Please wait...</span>}
isActive
style={{
backgroundColor: "rgba(233, 30, 99, 0.81)"
}}
>
The easiest way to use overlay
</ReactjsOverlayLoader>
);
};
Spinning, Audio, BallTriangle, Bars, Circles, Grid, Hearts, Oval, Puff, Rings, TailSpin, ThreeDots
name | description | type | default |
---|---|---|---|
isActive | enable or disable overlay | boolean | false |
style (optional) | you can provide your custom style | object | {} |
loaderContent (optional) | text/content need to be visible below loading icon | string or jsx | Loading... |
iconType (optional) | multiple loading icon options are available Spinning , Audio , BallTriangle , Bars , Circles , Grid , Hearts , Oval , Puff , Rings , TailSpin , ThreeDots |
string | Spinning |
icon (optional) | you can provide your custom icon | jsx | svg |
MIT © anilbad