react-loader-bubble
A loading component for React.
Installation
npm i -S react-loader-bubble
Usage
Global Loading
//... const Demo = <Container> <Content>...</Content> //... <Loader loading=loading /> </Container> ReactDOM
Partial Loading
Wrap your component where you want partial loading.
//... const Demo = <Container> <Content>...</Content> //... <Loader loading=loading> <Panel> ... </Panel> </Loader> </Container> ReactDOM
Props
Property | Type | Default | Description |
---|---|---|---|
color | string | #3da5d9(light blue) | Set color of loading component |
size | string | normal | Set size of loading component, value could be small , normal or large . |
loading | boolean | false | Set as true and display loading. |
text | string | "" | Display loading text if value is not empty. |
wrap | boolean | false | Set loading component whether be wrapped by a parent element. |
indicator | React Node | null | Customize loading indicator. |
background | string | rgba(255, 255, 255, 0.3) | Set background color of loading mask. |