# simple-canvas-progress-bar

> Simple canvas progress bar

Latest version **1.0.3** (published 2018-06-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-canvas-progress-bar
pnpm add simple-canvas-progress-bar
yarn add simple-canvas-progress-bar
bun add simple-canvas-progress-bar
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-06-06 |
| First published | 2018-06-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1006.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | “Charles |
| Maintainers | charlesbodman |

## Links

- npm: https://www.npmjs.com/package/simple-canvas-progress-bar
- Repository: https://github.com/charlesbodman/Canvas-Progress-Bar
- Homepage: https://github.com/charlesbodman/Canvas-Progress-Bar#readme
- Issues: https://github.com/charlesbodman/Canvas-Progress-Bar/issues
- npm.io page: https://npm.io/package/simple-canvas-progress-bar

## Recent versions

- 1.0.3 (latest) — 2018-06-06
- 1.0.2 — 2018-06-06
- 1.0.1 — 2018-06-06
- 1.0.0 — 2018-06-06

## README

# Simple Canvas Progress Bar
Simple canvas progress bar for smooth progress bar animations

# <img src="https://github.com/charlesbodman/simple-canvas-progress-bar/blob/master/progressbar.gif" width="487"/>

## Installation
```sh
npm install simple-canvas-progress-bar --save
```
## Usage
###
```typescript
import SimpleCanvasProgressBar from 'simple-canvas-progress-bar';

const canvasProgressBar = new SimpleCanvasProgressBar();

// Set the size of the progress bar in px
canvasProgressBar.setSize(450, 25);

// Set the colors of the progress bar
canvasProgressBar.setColors({ bar: ['#94f407', '#36a804'] });

// Animate the progress bar :)
canvasProgressBar.animate({
    from: 50, // Animate from percent
    to: 100, // Animate to percent
    speed: 1000, // Speed it takes from 0 to 100
    stripeSpeed: 100 // Speed the stripes animate at. (PX per second)
});


// Get canvas element to add to the dom
const canvasEl = canvasProgressBar.getCanvas();

// Example
var app = document.getElementById("app");
if (app !== null) {
    app.appendChild(canvasProgressBar.getCanvas());
}
```

---
_Source: https://npm.io/package/simple-canvas-progress-bar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
