progress-js

0.2.1 • Public • Published

npm version

Progress

Easily show a progress indicator for anything on your web page.

Installation

To use this library, you can install as an npm package if you are using Browserify.

npm install progress-js --save-dev

Usage

To use this package, given this html:

<div id="progress-container"></div>

And this css:

#progress-container {
  background: lightblue;
  width: 0;
  height: 4px;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: width 300ms ease, opacity 100ms;
}
 
#progress-container.active {
    opacity: 1;
    visibility: visible;
}

You can do:

let el = document.getElementById('progress-container');
let progress = new Progress(el);

Then, your progress instance has access to all methods available.

Package Sidebar

Install

npm i progress-js

Weekly Downloads

0

Version

0.2.1

License

ISC

Last publish

Collaborators

  • mkay581