Meter
A bare gauge — ████████░░░░ for a single ratio, with an optional label and trailing text.
Import
import { Meter } from '@sigx/terminal';
Usage
<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
| Prop | Type | Notes |
|---|---|---|
value | number | required |
max | number | denominator |
width | number | bar width in cells |
label / labelWidth | string / number | leading label, fitted to a column |
text | string | trailing readout |
smooth | boolean | sub-cell resolution |
color | string | theme token |
thresholds | Threshold[] | colour by fill |
See also
- ProgressBar — determinate progress with chrome.
- Sparkline — a series rather than one ratio.
