djyde / ToProgress

A lightweight top progress bar
http://djyde.github.io/ToProgress
522 stars 52 forks source link

ToProgress

NPM version npm npm

A lightweight (2.2 KB), no-dependency top progress bar library.

Demo

http://djyde.github.io/ToProgress

Screenshot

Desktop

desktop

Mobile

mobile

Quick Start

var options = {
  color: '#EEE',
  duration: 0.2,
  height: '2px'
}
var topbar = new ToProgress(options);

Support

Use cases

If you are using ToProgress.js in production, just tell us.

API

new ToProgress(options[,selector])

.increase(progress[,callback])

.decrease(progress[,callback])

.setProgress(progress[,callback])

.reset([,callback])

.finish([,callback])

.getProgress()

return current progress (percentage number)

.show()

.hide()

License

MIT License