Skip to content

@jsvision/ui / ProgressBarOptions

Interface: ProgressBarOptions

Defined in: ui/src/feedback/progress-bar.ts:85

Construction options for ProgressBar.

Properties

caption?

readonly optional caption?: boolean

Defined in: ui/src/feedback/progress-bar.ts:89

Show a centred NN% knockout caption over the bar. Default false.


label?

readonly optional label?: string | (() => string)

Defined in: ui/src/feedback/progress-bar.ts:96

Optional text placed around the bar (literal or reactive accessor). Repaints on change. A left/right label reserves width(label)+1 columns beside the bar, so a variable-width label reflows the bar as its text grows/shrinks (e.g. 9%10%100% retreats the bar a cell). Pad such a label to a stable width — e.g. () => `${pct}%`.padStart(4) — to keep the bar fixed.


labelPosition?

readonly optional labelPosition?: LabelPosition

Defined in: ui/src/feedback/progress-bar.ts:98

Where label sits. Default 'left' — the only position that fits on a one-row bar.


value

readonly value: Signal<number>

Defined in: ui/src/feedback/progress-bar.ts:87

Reactive progress in [0,1] (caller-owned; clamped on read). Writing it repaints.