react-load-mask
v3.0.2
Published
React load mask
Downloads
1,314
Maintainers
Readme
react-load-mask
A carefully crafted LoadMask for React
Install
$ npm i react-load-mask --save
Key features
- adjustable size
- adjustable visibility
- easily themeable
- css animations
- small footprint
Usage
import 'react-load-mask/index.css'
import LoadMask from 'react-load-mask'
<LoadMask visible={true} />
<LoadMask visible={true} size={20} />
<LoadMask visible={false} size={120} />
Props
visible
- defaults tofalse
. Set totrue
if you want theLoadMask
to be visible.size
- defaults to40
. The size of the loader inside theLoadMask
theme
- defaults to"default"
. See the theming section below.
Theming
The base css class of the component is react-load-mask
.
For having the default theme, just import react-load-mask/index.css
.
Basically, that uses react-load-mask/base.css
(the functional styles) AND react-load-mask/theme/default.css
(the default theme styles).
If you want to use/build another theme, you can render the LoadMask
as:
<LoadMask theme="custom" visible />
The code above makes the LoadMask
component have the react-load-mask--theme-custom
className.