Skip to content

ProgressBar

widgetsfeedback

ProgressBar: horizontal progress indicator

Installation

$ bunx termuijs add progress-bar

Copies the source into src/components/progress-bar/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { ProgressBar } from '@termuijs/widgets'
ts
new ProgressBar(style: Partial<Style> = {}, options: ProgressBarOptions = {})

API Reference

ProgressBar

PropTypeRequiredDescription
valuenumberoptionalCurrent value (0–1)
fillCharstringoptionalCharacter for the filled portion
emptyCharstringoptionalCharacter for the empty portion
fillColorColoroptionalColor of the filled portion
showLabelbooleanoptionalShow percentage label
labelFormat'percent' | 'fraction'optionalLabel format: 'percent' | 'fraction' | 'custom'
totalnumberoptionalTotal for fraction display
#feedback#progress-bar