Fraction complete in [0, 1]; values outside the range are clamped.
See ProgressBarOptions.
A single-line string ready for terminal output.
Behavior
progress is clamped to [0, 1].round(width * progress), remainder is unfilled.gradient (≥ 2 stops) is provided, it colors the filled portion; otherwise
color (if present) colors it uniformly. The unfilled portion is colored using
ProgressBarOptions.bgColor (foreground on the emptyChar), which is usually
invisible for spaces (see note in ProgressBarOptions.bgColor).border is true, wraps the bar in [...].showPercent is true, appends a space + Math.round(progress*100) + %.label is provided, prefixes label + " " before the bar.Unicode & width caveats
"█" comes from Block Elements and generally renders as one cell,
but fonts/terminals vary. :contentReference[oaicite:4]{index=4}wcwidth-style approach. :contentReference[oaicite:5]{index=5}UX notes
ANSI support
ESC[38;2;r;g;bm/ESC[48;2;r;g;bm on supporting terminals. :contentReference[oaicite:7]{index=7}
Render a terminal progress bar with optional color/gradient, label, and percent.