Esc
Documentation
On this page

Props

PropTypeDefaultDescription
value requirednumberNoneCurrent value, in the same unit as max
maxnumber100Upper bound of the scale
toneGaugeToneNoneColor band. Omit it to derive the band from scale.
scaleGaugeScale"higher-is-better"Which end of the scale is bad
showValuebooleantruePrint the value inside the ring
labelstringNoneAccessible description. Not drawn.

Example

ts
Gauge({ value: 72, scale: "higher-is-worse", label: "Disk used" })

Supporting types

GaugeTone
export type GaugeTone =
  | "info"
  | "healthy"
  | "warning"
  | "unavailable"
  | "muted";
GaugeScale
export type GaugeScale = "higher-is-better" | "higher-is-worse";

View the source on GitHub