Calm motion: animations on this site only fade, with no movement
Gauge
Zoned meter: semi-circle or linear
A reading with a good range and a bad one: load, temperature, battery, a score. The zones say what the number means. The needle says where it is now. For progress toward a finish, use Progress or CircularProgress. To let the user set a value, a Slider or Knob.
Basic
72%CPU load
4 °CFridge
zonesis a list of{ to, color, label }. Each zone runs from the end of the previous zone to itsto.coloris a token name (success,warning,danger,info,chart-1…) or any CSS color.labelis what a screen reader reads after the number ("72%, Busy"). Color alone never carries the meaning.variant="arc"is the half circle with a needle."linear"is a bar with a marker, for tight spaces.minandmaxset the scale (default 0 to 100). A value outside it pins the needle to the end and is announced clamped, but the number shown is the one you passed.formatshapes the number.labelnames the meter and sits under the number.- It is
role="meter", read-only. Withoutzonesit is a bare scale and needle.
Usage
ts
import { BlessGauge } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
value* | number | — | |
min | number | 0 | |
max | number | 100 | |
zones | BlessGaugeZone[] | — | |
variant | "arc" | "linear" | "arc" | |
label | string | "Gauge" | what is measured: names the meter for screen readers and shows under the number |
format | ((v: number) => string) | — | text for the value, e.g. `(v) => v + " °C"` |