Meter
Use Meter for a measurement within a known range, such as storage usage. Use Progress for completion of an ongoing task.
Preview
Storage usage
Present 64 GB used out of 100 GB with a visible label, value, and filled track.
Loading preview.
Installation
New to this Registry? Complete the base setup before continuing.
npx shadcn@latest add @neumorphism-ui/meterInstall the shared base once, then add components and their dependencies with the CLI.
Usage
Set the value and range, add MeterLabel and MeterValue, and compose MeterTrack with MeterIndicator. Include units or context when a percentage alone is unclear.
"use client";
import { Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue } from "@/components/ui/meter";
export default function Example() {
return (
<Meter value={64} max={100}>
<MeterLabel>Storage used</MeterLabel>
<MeterValue />
<MeterTrack><MeterIndicator /></MeterTrack>
</Meter>
);
}API Reference
Represent a measurement within a known range. Use Progress for task completion. Pair MeterLabel with a visible numeric value.
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
Meter | value | number | — | Current measurement within the range. |
Meter | min / max | number | — | Set the minimum and maximum bounds. |
Meter | format | Intl.NumberFormatOptions | — | Configure locale-aware number formatting. |
Accessibility
- 01
Use Progress for task completion. Pair MeterLabel with a visible numeric value.
- 02
Preserve labels and visible focus when customizing render or className.