Skip to content
  • System
  • Light
  • Dark
  • High contrast

LinearGauge

Assessed72 / 86
Complete45%
Criteria86 / 86
import { LinearGauge } from '@eekodigital/raster';

<LinearGauge value={72} max={86} label="Assessed" />
<LinearGauge value={45} max={100} label="Complete" color="var(--demo-warn)" formatLabel={(v) => `${v}%`} />
<LinearGauge value={86} max={86} label="Criteria" color="var(--demo-good)" />
  • role="meter" with aria-valuemin, aria-valuemax, aria-valuenow and aria-valuetext from format.
  • Named by the visible label through aria-labelledby.
  • Fills its container’s width; the grow animation stops under prefers-reduced-motion.

See the Accessibility guide for the shared structure, the labels prop and screen-reader testing.

PropTypeDefaultDescription
valuenumber—Required.
minnumber0Start of the range.
maxnumber—Required. End of the range.
labelstring—Required. Visible label and accessible name.
format(value: number) => stringIntl.NumberFormat(“en”)

Formats the value and aria-valuetext.

formatLabel(value, max) => string—

Visible value text (default {value} / {max}).

heightnumber8Track height in px.
colorstringseries 1Fill colour.
classNamestring—