@cactive/progress
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@cactive/progress

Extremely lightweight progress bar library with additional gradient support.


Installation

$ yarn add @cactive/progress

Usage

You can import the library and create a progress bar using the following command:

import Progress from "@cactive/progress";

const progress = new Progress();

Show the progress bar and begin animating it by calling the .start() and it with the .end() method.

progress.start();
await new Promise((resolve) => setTimeout(resolve, 2000));
progress.end();

Customisation

You can customise the progress bar by passing an options object to the constructor.

const progress = new Progress({
  // You can set a static colour if you prefer.
  // colour: "#7289da",
  
  // By default the progress bar will use a gradient.
  variant: "gradient",
  
  // Override the default gradient
  gradient: {
    from: "#7289da",
    to: "#99aab5",
  },
});

Readme

Keywords

none

Package Sidebar

Install

npm i @cactive/progress

Weekly Downloads

2

Version

1.0.1

License

SEE LICENSE IN LICENCE.md

Unpacked Size

30.9 kB

Total Files

15

Last publish

Collaborators

  • tascord
  • cactiveaccount