putz
A super-small progress bar with a full API and the ability to putz: increment randomly to simulate loading events. 599b gzipped.
Install
npm i putz --save
Usage
/** * Default * * Inserts loader as first child of * document.body, with default options */const loader = /** * With options */const loader = // Start loadingloaderstart // Randomly incrementloader // Increment by 15loader // Go to 50%loader // Randomly increment every 100msloader // Go to 100% and hideloader // Remove bar from DOMloader
Recommended CSS
Replace putz
here with the classname you passed to the classname
option, and replace transition speed with the value passed to the speed
option.
Related Projects
- nprogress Slim progress bars for Ajax'y applications. by @rstacruz
- nanobar Very lightweight progress bars. by @jacoborus
MIT License