A loading modal component using React portals.
-
Yarn:
yarn add react-loading-bubbles -
NPM:
npm install react-loading-bubbles --save
import React from 'react';
// Import the component
import LoadingModal from 'react-loading-bubbles';
function MyComponent(props) {
// Use the component
return (
<>
<p>Loading bubbles!</p>
{props.isLoading && <LoadingModal size={128} color="#2c7594" />}
</>
);
}| Name | Type | Default | Description |
|---|---|---|---|
size |
number |
128 | Size of the loading SVG. |
color |
string |
#2c7594 | The color of the loading bubbles. |