Skip to content
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
  • zones is a list of { to, color, label }. Each zone runs from the end of the previous zone to its to. color is a token name (success, warning, danger, info, chart-1…) or any CSS color. label is 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.
  • min and max set 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.
  • format shapes the number. label names the meter and sits under the number.
  • It is role="meter", read-only. Without zones it is a bare scale and needle.

Usage ​

ts
import { BlessGauge } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
value*number—
minnumber0
maxnumber100
zonesBlessGaugeZone[]—
variant"arc" | "linear""arc"
labelstring"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"`

Released under the MIT License. Character names and artwork belong to their owners.