Meter
A graphical representation of a measured value within a fixed range, perfect for showing scores, ratings, or resource usage. It provides clear visual feedback.
Basic
A meter displays a value within a specified range, showing how much of the total range is currently occupied. Unlike a progress bar, which typically indicates progress towards completing a task over time, a meter reflects a specific measurement or quantity at a given moment.
Installation
npx shadcn@latest add @intentui/meterComposed components
When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.
This component comes packed with several components to enhance functionality and provide a seamless experience.
Manual installation
npm i react-aria-componentsAnatomy
import { Meter } from "@/components/ui/meter"
<Meter label="Storage space" value={32} />Decimal format
By default, the meter will display the value as a percentage. You can change the format of the value by passing a formatOptions prop. This example is shown decimal format.
Currency format
You can also change the currency format of the value by passing a formatOptions prop. This example is shown currency format.