Skip to Content
Columbus

Meter

A visual representation of a value within a known range.

Storage used
x

Installation

pnpm dlx shadcn@latest add @columbus/meter

Usage

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.

x

Formatted value

Set min and max for a custom range. Pass a function to MeterValue to format what it shows.

Rating
x
Bandwidth (Mbps)
x

API reference

Meter wraps Base UI Meter. Each part accepts the props of its Base UI counterpart.

PartBase UI part
MeterMeter.Root
MeterLabelMeter.Label
MeterTrackMeter.Track
MeterIndicatorMeter.Indicator
MeterValueMeter.Value

Prop

Type

On this page