Meter
data
Meter: a self-contained metric display with label, bar, and value with low/optimum/high thresholds
Terminal
$termuijs render meter
Installation
$ bunx termuijs add meter
Copies the source into src/components/meter/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Meter } from '@termuijs/widgets'ts
new Meter(label: string, style: Partial<Style> = {}, opts: MeterOptions = {})API Reference
Meter
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | required | — |
low | number | optional | Value below this fraction renders the low color |
high | number | optional | Value at or above this fraction renders the high color |
showLabel | boolean | optional | Show the percentage label |