Skip to content
Docs
Components
Feedback
Meter

Meter

Meter is used to display finite value that are within a known range eg., CPU usage. It uses AdaptUI Core's Meter component internally.

Imports

import {
  Meter,
  MeterBar,
  MeterBarWrapper,
  MeterHint,
  MeterLabel,
  MeterTrack,
  MeterWrapper,
} from "@adaptui/react-tailwind";
💡

A complex component that supports customization as per the composition guide.

Usage

Meter sizes

Sizes can be set using the size prop. The default size is md. The available sizes are: sm md lg xl

Min max values

Set the min and max values of the progress bar.

Meter Label

Meter also comes with A11y label that can also be used to describe the meter.

Meter Hint

Meter comes with A11y hint that can be used with label to indicate the meter status.

Meter Interval

Meter has an interval that can be used to indicate multiple range of the meter.

Customizing Meter

To customize the appearance of the Meter component we can simply pass down children components (MeterTrack, MeterBar) for more control.

API Reference

Prop

Type

Default

sizeunionmd
intervalsnumber-
flatBordersboolean-
hintReact.ReactNode-
labelReact.ReactNode-
Last updated on July 26, 2022