loadin.js
Simple page loading indicator
⚙️ Installation
npm i loadin
CDN:
📖 Documentation
🔸
Import loadin
import loadin from 'loadin';
🔸
Create page loading indicator
loadin.page();
🔸
Create page loading indicator with options
loadin.page({
position: 'fixed',
top: '0',
left: '0',
height: '10px',
width: '1%',
zIndex: '69',
transition: 'width 1s ease',
background: 'red',
append: 'div.navbar'
});
🔸
Custom page loader
const loader = loadin.create();
loadin.applyDefault(loader);
loadin.css(loader, 'background: yellow;');
loadin.width(loader, '60%');
setTimeout(() => {
loadin.remove(loader);
}, 3000)
🔸
loadin.create() with options
const loader = loadin.create({
append: 'div',
class: 'myLoader'
})