LinearGauge
Examples
Section titled “Examples”Assessed72 / 86
Complete45%
Criteria86 / 86
import { LinearGauge } from '@eekodigital/raster';
<LinearGauge value={72} max={86} title="Assessed" />
<LinearGauge value={45} max={100} title="Complete" color="var(--demo-warn)" formatLabel={(v) => `${v}%`} />
<LinearGauge value={86} max={86} title="Criteria" color="var(--demo-good)" />Accessibility
Section titled “Accessibility”role="meter"witharia-valuemin,aria-valuemax,aria-valuenowandaria-valuetextfromformat.- Named by the visible
titlethrougharia-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.
| Prop | Type | Description |
|---|---|---|
value | number | Required. |
min | numberDefault: | Start of the range. |
max | number | Required. End of the range. |
title | string | Required. Visible title and accessible name. |
labels | ChartLabelOverrides |
|
formatValue | (value: number) => stringDefault: | Formats the value and |
formatLabel | (value, max) => string | Visible value text (default |
height | numberDefault: | Track height in px. |
color | stringDefault: | Fill colour. |
className | string |