loar
v1.0.1
Published
simple loading bar
Downloads
3
Readme
loar
Simple loading bar
Installation
npm i loar
Usage
import loar, { Loar } from "loar";
loar.start();
Default export: loar
- an instance of Loar class
Create new instance
const loar = new Loar(options);
loar.start();
Class init options / properties
| name | type | default | description | | -------- | ------ | ------- | ------------------------------------ | | color | string | white | Loading bar color (using picocolors) | | symbol | string | ▬ | Loading bar symbol | | text | string | | Add text above loading bar | | width | number | 20 | Loading bar width | | interval | number | 10 | Loading bar interval |
Example
loar.start();
setTimeout(() => loar.stop(), 6000);