Skip to main content

Meter

A measured amount within a known range (role="meter") — not task progress.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

A measured amount within a known range (role="meter") — not task progress.

Accessibility​

Status messages use role="status" / aria-live="polite" (or assertive for errors) so updates are announced without stealing focus.

Install and import​

npx shadcn@latest add @prism/meter
import { Meter } from '@/components/prism/Meter';

In a no-build prototype, read it from the bundle instead: const { Meter } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
valuenumberYesThe measured amount.
minnumber—Bottom of the range. Default 0.
maxnumber—Top of the range. Default 100.
labelReact.ReactNode—What's measured. A string also names the meter for screen readers (else pass aria-label).
valueLabelReact.ReactNode—Replaces the shown value text, e.g. "14 of 20 beds".
showValueboolean—Show the value beside the label. Default true.
tone"accent" | "positive" | "notice" | "negative" | "neutral"—
formatValue(value: number) => string—Formats the shown value, e.g. (v) => ${v} MB. Default: percent of the range.
classNamestring—