Loading management
React Bootstrap 5 Loading management
Displays animation in a container (such as a table) while loading data.
Note: Read the API tab to find all available options and advanced customization
Basic example
Loading automatically init when you add class loading
to your element. Loading
automatically attach to body
element, so if you want attach loading to element
you have add parentRef
property with a reference to your parent.
Colors
You can set a diffrent colors to loader with text-*
color like primary, success,
danger, warning.
Custom spinners
MDB Growing spinner
If you don’t fancy a border spinner, switch to the grow spinner. While it doesn’t technically spin, it does repeatedly grow!
Font Awesome
Delay
Full screen
Loading management - API
Import
Properties
MDBLoadingManagement
Name | Type | Default | Description | Example |
---|---|---|---|---|
backdrop
|
boolean | true |
Set loader backdrop/td> |
<MDBLoadingManagement backdrop={false} />
|
backdropColor
|
string | rgba(0, 0, 0) |
Set loader backdrop color |
<MDBLoadingManagement backdropColor="red" />
|
backdropOpacity
|
number | 0.4 |
Set loader backdrop opacity |
<MDBLoadingManagement backdropOpacity={0.2} />
|
color
|
'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'light' | 'dark' | 'muted' | 'white' | 'info' | '' |
Change color of the text |
<MDBLoadingManagement color="secondary" />
|
loadingText
|
React.ReactNode | Loading... |
Set text to loader |
<MDBLoadingManagement loadingText="In progress"
/>
|
isOpen
|
boolean | true |
Open state of the show loader |
<MDBLoadingManagement isOpen={openState} />
|
fullScreen
|
boolean | false |
Set backdrop fullscreen |
<MDBLoadingManagement fullScreen />
|
overflow
|
boolean | true |
Set overflow='none' to backdrop |
<MDBLoadingManagement overflow={false} />
|
parentRef
|
React.RefObject |
null |
Reference to parent element |
<MDBLoadingManagement parentRef={parent} />
|
ref
|
React.RefObject |
null |
Reference to the element |
<MDBLoadingManagement ref={reference} />
|
spinnerElement
|
React.ReactNode | '' |
Change the spinner element |
<MDBLoadingManagement spinnerElement={customSpinner} />
|
textClassName
|
string | '' |
Add custom class to MDBLoadingManagement text |
<MDBLoadingManagement textClassName="class" />
|
textStyles
|
React.CSSProperties | undefined |
Add custom styles to MDBLoadingManagement text |
<MDBLoadingManagement textStyles={{color: 'red'}} />
|