pencil.js
Version:
Nice modular interactive 2D drawing library.
32 lines (22 loc) • 1.11 kB
Markdown
Progress-bar component.

```js
import { ProgressBar } from "pencil.js";
const position = [100, 200];
const options = {
width: 200, // width in pixel
value: 0, // initial value (from 0 to 1)
speed: 0.3, // transition speed (0 means no changes, 1 mean instant change)
};
const progressBar = new ProgressBar(position, options);
progressBar.value = 0.5; // set to 50%
```
Inherit from [InputOptions](../input/readme.md
| Name | Type | Default | Comment |
|-------|----------|---------|------------------------------------------------------------------------------|
| value | `Number` | `0` | Initial value |
| width | `Number` | `200` | Size of the slider |
| speed | `Number` | `0.3` | Transition speed between two value (0 mean no change, 1 mean instant change) |