Meter
A visual representation of a value within a known range.
Storage used
Installation
pnpm dlx shadcn@latest add @columbus/meterUsage
import {
Meter,
MeterIndicator,
MeterLabel,
MeterTrack,
MeterValue,
} from "@/components/ui/meter";
<Meter value={40}>
<MeterLabel>Storage used</MeterLabel>
<MeterValue />
<MeterTrack>
<MeterIndicator />
</MeterTrack>
</Meter>;Use Meter for a measurement, like disk usage or a password's strength. For a task that moves toward completion, use Progress.
Without a label
With no children, Meter renders only the track and indicator. Pass
aria-label so screen readers can name it.
Formatted value
Set min and max for a custom range. Pass a function to MeterValue to
format what it shows.
Rating
Bandwidth (Mbps)
API reference
Meter wraps Base UI Meter. Each part accepts the props of its Base UI counterpart.
| Part | Base UI part |
|---|---|
Meter | Meter.Root |
MeterLabel | Meter.Label |
MeterTrack | Meter.Track |
MeterIndicator | Meter.Indicator |
MeterValue | Meter.Value |
Prop
Type