Meter#

A bare gauge — ████████░░░░ for a single ratio, with an optional label and trailing text.

Import#

TSX
import { Meter } from '@sigx/terminal';

Usage#

TSX
<Meter label="heap" value={used} max={total} text={`${pct}%`} width={16} />

ProgressBar covers determinate progress and owns the percentage readout and the gradient variants. This is the compact shape — no chrome, sized to sit in a table cell or a row of stats.

A non-zero ratio always shows at least one cell. Rounding a real 2% down to an empty bar reads as "nothing", which is a different fact.

thresholds colour the bar by how far along it is, so a gauge can go amber at 80% and red at 95% without the app re-deriving that every frame.

Props#

PropTypeNotes
valuenumberrequired
maxnumberdenominator
widthnumberbar width in cells
label / labelWidthstring / numberleading label, fitted to a column
textstringtrailing readout
smoothbooleansub-cell resolution
colorstringtheme token
thresholdsThreshold[]colour by fill

See also#