Progress Bars
$
ProgressBar
FREEAnimated progress bars with gradient colors, percentage display, item counts, and ETA calculation.
animatedgradienteta
# Preview
BOOTING PREVIEW
# Usage
import { ProgressBar } from '@taracod/termui';
const bar = new ProgressBar({
total: 100,
width: 40,
title: 'Downloading',
gradient: true,
showETA: true,
});
bar.start();
for (let i = 0; i <= 100; i++) {
bar.update(i);
await sleep(30);
}
bar.finish('Download complete!');# API
| Prop | Type | Default | Description |
|---|---|---|---|
| total | number | 100 | Total number of units to complete |
| width | number | 40 | Rendered bar width in terminal cells |
| gradient | boolean | false | Blend red to yellow to green across the fill |
| showETA | boolean | true | Estimate remaining time from update velocity |