API Reference
Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also accepted unless noted.
Meter.Root
Groups all parts of the meter and provides the value for screen readers. Renders a <div> element.
Props
format Intl.NumberFormatOptions —
- Name
format- Description
Options to format the value.
- Type
Intl.NumberFormatOptions | undefined
getAriaValueText function —
- Name
getAriaValueText- Description
A function that returns a string value that provides a human-readable text alternative for
aria-valuenow, the current value of the meter.- Type
((formattedValue: string, value: number) => string | undefined) | undefined
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present on the element when applicable. |
data-progressing | Present on the element when applicable. |
Meter.Indicator
Visualizes the position of the value along the range. Renders a <div> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present on the element when applicable. |
data-progressing | Present on the element when applicable. |
Meter.Label
An accessible label for the meter. Renders a <span> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present on the element when applicable. |
data-progressing | Present on the element when applicable. |
Meter.Track
Contains the meter indicator and represents the entire range of the meter. Renders a <div> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present on the element when applicable. |
data-progressing | Present on the element when applicable. |
Meter.Value
A text element displaying the current value. Renders a <span> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present on the element when applicable. |
data-progressing | Present on the element when applicable. |