Progress
Displays the status of a task that takes a long time.
API reference
Import the component and place its parts the following way:
import { Progress } from '@base-ui-components/react/progress';
<Progress.Root>
<Progress.Track>
<Progress.Indicator />
</Progress.Track>
</Progress.Root>
Root
Groups all parts of the progress bar and provides the task completion status to screen readers.
Renders a <div>
element.
Prop | Type | Default | |
---|---|---|---|
aria-label | string | undefined | |
aria-labelledby | string | undefined | |
aria-valuetext | string | undefined | |
className | string | (state) => string | undefined | |
getAriaLabel | (value) => string | undefined | |
getAriaValueText | (value) => string | undefined | |
max | number | 100 | |
min | number | 0 | |
render | | React.ReactElement | undefined | |
value | number | null |
Attribute | Description | |
---|---|---|
data-complete | Present when the progress has completed. | |
data-indeterminate | Present when the progress is in interminate state. | |
data-progressing | Present while the progress is progressing. |
Track
Contains the progress bar indicator.
Renders a <span>
element.
Prop | Type | Default | |
---|---|---|---|
className | string | (state) => string | undefined | |
render | | React.ReactElement | undefined |
Attribute | Description | |
---|---|---|
data-complete | Present when the progress has completed. | |
data-indeterminate | Present when the progress is in interminate state. | |
data-progressing | Present while the progress is progressing. |
Indicator
Visualizes the completion status of the task.
Renders a <span>
element.
Prop | Type | Default | |
---|---|---|---|
className | string | (state) => string | undefined | |
render | | React.ReactElement | undefined |
Attribute | Description | |
---|---|---|
data-complete | Present when the progress has completed. | |
data-indeterminate | Present when the progress is in interminate state. | |
data-progressing | Present while the progress is progressing. |