Skip to content

GMartigny/circular-progress-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Circular-progress-bar

NPM version NPM weekly download package publish size

Sample progress-bar

CSS circular progress bar.

Installation

npm install circular-progress-bar

Usage

Once installed, add it to your project with common.js or ES6 syntax :

const CircularProgressBar = require("circular-progress-bar");
// or
import CircularProgressBar from "circular-progress-bar";

Then, you can start to use it on your code :

const options = {
    size: 200,
    background: "transparent"
};
const progress = new CircularProgressBar(42, options);
progress.appendTo(document.body);

Since today's web browser don't support module requirements yet, you need to use a bundler like webpack or browserify.

This module need its style, so your build chain need to be able to deal with CSS file import.

CDN

If you have no build tool, you can directly fetch it from CDN.

<script src="https://unpkg.com/circular-progress-bar"></script>

<script>
    const gauge = new CircularProgressBar();
</script>

Documentation

Check the full documentation or some examples.

License

MIT