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.
Progress.Root
Groups all parts of the progress bar and provides the task completion status to 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
Accepts a function which returns a string value that provides a human-readable text alternative for the current value of the progress bar.
- Type
| ((formattedValue: string | null, value: number | null) => string | undefined) | undefined
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present when the progress has completed. |
data-indeterminate | Present when the progress is in indeterminate state. |
data-progressing | Present while the progress is progressing. |
Progress.Indicator
Visualizes the completion status of the task. Renders a <div> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present when the progress has completed. |
data-indeterminate | Present when the progress is in indeterminate state. |
data-progressing | Present while the progress is progressing. |
Progress.Label
An accessible label for the progress bar. Renders a <span> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present when the progress has completed. |
data-indeterminate | Present when the progress is in indeterminate state. |
data-progressing | Present while the progress is progressing. |
Progress.Track
Contains the progress bar indicator. Renders a <div> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present when the progress has completed. |
data-indeterminate | Present when the progress is in indeterminate state. |
data-progressing | Present while the progress is progressing. |
Progress.Value
A text element displaying the current value. Renders a <span> element.
Props
Data attributes
| Attribute | Description |
|---|---|
data-complete | Present when the progress has completed. |
data-indeterminate | Present when the progress is in indeterminate state. |
data-progressing | Present while the progress is progressing. |