Skip to main content
PROYECTOVIVIANA

ProgressBar

The props declared for ProgressBar, generated from the types @proyecto-viviana/ui ships.

Import

import { ProgressBar } from "@proyecto-viviana/ui";

Props

Differs from @proyecto-viviana/solid-spectrum
  • pendingValue exists only here.
  • trackStyle exists only here.
  • segments exists only here.
Props for ProgressBar in @proyecto-viviana/ui
PropTypeDefaultDescription
valuenumber0The current value.
pendingValuenumber—A second value beyond `value` rendered as a dithered extension of the fill — the register's "in flight" segment (the XP bar's 6% checker after the 84% solid, TerminalGlassLab.tsx:773-780). Purely visual; the accessible value stays `value`. Ignored while indeterminate.
trackStyle'bar' | 'bracket''bar'How the track is drawn. `"bar"` is the filled 8px recess; `"bracket"` replaces it with the register's mono readout of the same value — `[▮▮▮▮▯▯▯▯▯▯]` — for rows that live inside a terminal well, where a painted bar reads as a foreign object among text. The bracket is decorative (`aria-hidden`): the accessible value is the `progressbar` role's own, identical in both forms. Indeterminate progress always draws the bar — a fixed glyph run cannot sweep without inventing motion. Local addition — no S2 counterpart.
segmentsnumber[]—Relative widths of the track's sections, e.g. `[3, 1, 2]` for a three-chapter run. The bar is cut into that many sections, each proportional to its number and split from its neighbour by a hairline gap; the fill (and the `pendingValue` dither) flows across them exactly as it does across the undivided bar. Values ≤ 0 and arrays shorter than two entries are ignored. Purely visual — the accessible value is unchanged. Local addition — no S2 counterpart.
minValuenumber0The smallest value allowed.
maxValuenumber100The largest value allowed.
valueLabelnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—The content to display as the value's label, e.g. "1 of 4".
isIndeterminatefalse | true—Whether presentation is indeterminate when progress isn't known.
formatOptionsIntl.NumberFormatOptions—The display format of the value label.
size'S' | 'M' | 'L' | 'XL''M'The size of the progress bar.
labelnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—The label to display above or beside the progress bar.
staticColor'white' | 'black' | 'auto'—The static color style to apply over a color background.
labelPosition'top' | 'side''top'The label's overall position relative to the progress bar.
stylesStyleString | (() => StyleString | undefined)—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
idstring—Not yet documented
slotstring—Not yet documented
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Not yet documented
aria-labelstring—Not yet documented
aria-labelledbystring—Not yet documented
aria-describedbystring—Not yet documented
aria-detailsstring—Not yet documented

Declared in packages/viviana-ui/src/progress-bar/index.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.