Dapper UI
Download more icon variants from https://tabler-icons.io/i/brand-github View on GitHub
Download more icon variants from https://tabler-icons.io/i/notebook Getting Started
Quick Start (tl;dr)
Installation
Usage
Download more icon variants from https://tabler-icons.io/i/components Components
Button
TextField
Slider
Select
Checkbox
Text
Dialog
Modal
ProgressBar
Meter
Download more icon variants from https://tabler-icons.io/i/bulb Concepts
Theming
Colors
Icons
Styling
Dark Mode
Download more icon variants from https://tabler-icons.io/i/notebook Getting Started
Quick Start (tl;dr)
Installation
Usage
Download more icon variants from https://tabler-icons.io/i/components Components
Button
TextField
Slider
Select
Checkbox
Text
Dialog
Modal
ProgressBar
Meter
Download more icon variants from https://tabler-icons.io/i/bulb Concepts
Theming
Colors
Icons
Styling
Dark Mode

Meter

import { Meter } from "@dapper-ui/core";
A visual representation of a numerical value within a specified range, such as displaying the battery percentage on a device.

Demo

Example
Color
1
<Meter value={25} label="Example"/>

Accessibility + Usability

It is highly recommended to label the meter for accessibility purposes. Even if you do not want to display the label for aesthetic reasons, you should still set a label and hide it with the hideLabel prop. This ensures that the label is still accessible to users who rely on assistive technologies such as screen readers.
Screen readers usually read the value of a meter as a percentage. However, if this doesn't accurately reflect the meter's current status, you should use the ariaValuetext prop to provide a more accurate text description of the current value.
Avoid using the meter as a progress bar, for example to display file download progress. Instead, use the ProgressBar component for this purpose.

Props

Meter

labelId

Type
string
Default Value
Autogenerated random ID

The id of the label element.

color

Type
string | undefined
Default Value
undefined

The name of a color in the theme. Does not support arbitrary colors.

When set to undefined, the primary color of the theme will be used.

radius

Type
Radius | undefined
Default Value
undefined

The border radius of the button. When set to undefined, the button will have the default border radius defined in the theme.

label

Type
string | undefined
Default Value
None

A label for the meter.

It is highly recommended to label the meter for accessibility purposes. Even if you do not want to display the label for aesthetic reasons, you should still set a label and hide it with the hideLabel prop. This ensures that the label is still accessible to users who rely on assistive technologies such as screen readers.

hideLabel

Type
boolean
Default Value
false

Visually hides the label.

ariaValuetext

Type
string | undefined
Default Value
undefined

The aria-valuetext attibute.

Screen readers usually read the value of a meter as a percentage. However, if this doesn't accurately reflect the meter's current status, you should use the ariaValuetext prop to provide a more accurate text description of the current value.

value

Type
number
Default Value
0

The current value of the meter.

Should be between the min and max values.

min

Type
number
Default Value
0

The minimum value of the meter.

max

Type
number
Default Value
100

The maximum value of the meter.

style

Type
string | undefined
Default Value
undefined

Custom CSS styles to apply.

Especially useful for positioning styles like margings.