Gauge
A React component in Beamline's Charts & data-vis category.
One value against a known range: a semicircle, a 270° dial or a full ring, filled or with a needle, coloured bands with their names (healthy, busy, saturated), an optional target tick, the value large in the middle, and a meter that assistive technology reads.
Use it for
- A single reading against a known range with thresholds: CPU, error budget left, health score, NPS.
Not for
- Several values side by side (bar-list).
- A quota made of parts (usage-meter).
- Progress through a task (progress).
- A number with its trend (metric-card).
Anatomy
- figure
- track (bands drawn along it when given)
- value arc (fill) or needle with hub
- target tick and its label
- min and max labels
- value (rolling digits)
- band name (badge with glyph)
- title and description (caption)
Variants
- 0: shape: semi (180°) · dial (270°) · ring (360°)
- 1: indicator: fill · needle
- 2: size: sm · md · lg
- 3: bands (tone + label per threshold)
- 4: target
States
- loading (ring skeleton)
- unmeasured (value null: hatched track, “Not measured”, no needle)
- within each band (the band's tone and name)
- out of range (clamped to the ends; the text keeps the real value)
- right-to-left: the arc still runs from min on the left (a scale, not reading order)
Keyboard
- Not focusable: a meter is read, not operated. role="meter" with aria-valuenow/min/max and aria-valuetext including the band name
Motion
Sweeps from the minimum once on first draw; later values glide to the new angle and the digits roll; all instant under reduced motion. With bands, pointing at the gauge or focusing it reveals where each zone begins on the scale (always shown on touch).
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value (required) | number | null | — | The reading; null draws the unmeasured state. |
min / max | number | — | min: Minimum permitted value. Defaults to 0. max: Maximum permitted value. Defaults to 100. |
bands | GaugeBand[] | — | Zones in ascending order, such as healthy, busy, saturated. |
target | { value: number; label: string } | — | A tick on the track: a goal or a limit. |
shape | "semi" | "dial" | "ring" | — | semi: 180°. dial: 270°, open at the bottom. ring: a full turn. |
indicator | "fill" | "needle" | — | fill: an arc grows to the value. needle: a pointer over the bands. |
size | "sm" | "md" | "lg" | "fill" | — | Fixed diameter: sm 140px, md 184px or lg 240px; defaults to md. Deprecated: The value fill aliases fill={true}. |
format | (value: number) => string | — | How the value, range and target read: "72%". |
title / hideTitle / description | string / boolean / ReactNode | — | title: The meter's name, shown under it unless hideTitle; always its accessible name. hideTitle: Hides the title; defaults to false. Deprecated: Use showTitle={false} instead. description: Supporting text beneath the label or heading. Defaults to no supporting text. |
loading | boolean | — | Shows the loading state while data or an operation is pending. Defaults to false. |
className | string | — | Classes on the documented visual root; no override by default. |
classNames | GaugeClassNames | — | Classes for the named visual parts; no part overrides by default. |
style / ref | CSSProperties / Ref<HTMLElement> | — | style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default. |
showTitle | boolean | true | Shows the title visually while keeping its accessible name; defaults to true. Takes precedence over hideTitle. |
fill | boolean | — | Fit the room from 96 to 360px instead of a fixed size; defaults to false and overrides size=fill. |
min | number | — | Minimum permitted value. Defaults to 0. |
max | number | — | Maximum permitted value. Defaults to 100. |
title (required) | string | — | The meter's name, shown under it unless hideTitle; always its accessible name. |
hideTitle | boolean | — | Hides the title; defaults to false. Deprecated: Use showTitle={false} instead. |
description | ReactNode | — | Supporting text beneath the label or heading. Defaults to no supporting text. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
ref | Ref<HTMLElement> | — | Receives the documented root element; no ref by default. |
Built from
- Badge
- Button
- Checkbox
- Chip group
- Dropdown menu
- Empty state
- Glow
- Kbd
- Label
- Pagination
- Search field
- Select
- Skeleton
- Slot text
- Spinner
- Table
- Tooltip
Used in
Dependencies
motion
Import
import { Gauge } from "@beamline/gauge";
Get it
Gauge is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent
More in Charts & data-vis
- Sankey chart: Flows between stages as bands whose width is the amount: sources to pages to outcomes, budgets to teams; hovering or focusing a node lights its flows and…
- Geo map: Values by country as a choropleth on the system's own world outline (no map service): classes from a sequential or diverging ramp with a legend you can…
- Streamgraph: Stacked flows over time around a centre baseline, with silhouette, wiggle, expand (shares) and zero offsets: a legend that turns layers on and off, a…
- Ridgeline: Distributions per group as overlapping density ridges (response time by region, order size by plan): an overlap control, median and p95 readouts per row…
- Treemap: Nested rectangles sized by value (spend by team, then service), squarified so tiles stay close to square: labels that fit or hide, hover and focus…
- Gantt chart: A plan as bars on a timeline: tasks grouped down the side, each bar from its start to its end with its progress, milestones as diamonds, arrows from each…
- Activity heatmap: A calendar of daily counts, one cell per day on a sequential ramp: weeks across, weekdays down, month and weekday labels, a legend scale, hatched days…
- Radial chart: Progress of a few measures toward their targets as concentric rings, full or half circle, with a centre readout and a list of each ring's value, target…
- Radar chart: A few series compared across the same five to eight dimensions as polygons on a polygon or circle grid; hover or arrow keys pick a dimension and read…
- Scatter chart: Two measures of many items against each other, one point per item, or a bubble chart when a third measure sizes the points: groups by colour and shape…
- Area chart: Amounts over time as filled areas: overlapping, stacked or as shares of 100%, five fills, two strokes, five curves, a range handle; gaps for missing…
- Composed chart: Different measures on one time axis: bars, lines and areas per series, a left and a right value axis with their own formats, and reference lines.
- Funnel chart: People or deals moving through ordered steps, each step a bar narrowing from the first: the part lost between two steps stays beside the next as a fading…
- Waffle chart: Units of a whole as a grid of cells by category (seats used of a plan, tickets by channel): a 10×10 grid by default, hatched cells for units whose…
- Slope chart: Change between two points in time per item, by value or by rank: labels on both sides that never collide, rising and falling told by the end marker (▲ ▼)…
- Line chart: Values over time as lines: curves, point markers, dashed series for forecasts, reference lines for limits and targets, an optional zero baseline and a…
- Bar chart: Amounts by category as bars: columns or rows, grouped, stacked or as shares, reference lines, five looks (rounded, cells, trace, isometric, monospace), a…
- Pie chart: A few shares of a whole as a pie or donut, with spaced slices, percent labels, a centre readout and a list of every slice with value and share; hovering…
- Sparkline: A compact trend beside its value: point along it or focus it and use ← → to read each point; nulls are gaps. TrendLine is the bare line.