$ ProgressBar

animatedgradient

Animated progress bars with gradient colors, percentage display, item counts, and ETA calculation.

# Preview

progressbar demo
Installing ████████████████████████░░░░░░░░░░░░░░░ 65% 65/100 ETA 1.2s
Building ████████████████████████████████████████ 100% 100/100
Build complete!

# Usage

example.ts
import { ProgressBar } from "@vr_patel/tui";

const bar = new ProgressBar({
  total: 100,
  width: 40,
  title: "Downloading",
  gradient: true,      // red → yellow → green
  showETA: true,
});

bar.start();
for (let i = 0; i <= 100; i++) {
  bar.update(i);
  await sleep(30);
}
bar.finish("Download complete!");

# API

PropTypeDefaultDescription
totalnumber100Total number of items
widthnumber40Width of the bar in characters
titlestring""Label shown before the bar
gradientbooleantrueEnable red → yellow → green gradient
showPercentagebooleantrueShow percentage after bar
showCountbooleantrueShow current/total count
showETAbooleantrueShow estimated time remaining
barColorstringfg.cyanColor when gradient is off
completeCharstring"█"Filled bar character
incompleteCharstring"░"Empty bar character