You can use easypreloader package to add built in preloader for a web app.
- 1.0.0
- 1.0.1
npm i easypreloader --save
After that import the package
import {easyloader} from 'easypreloader';
var loader = new easyloader({
background:"black",
path:"your icon path"
});
loader.generateLoader();
easyloader provides two options and both are optional:
- background //specify the color here ( Default to #00000 )
- path //specify the path of your loading icon (Default icon)
- preloader for specific sections on the page which fetch data from Apis