Progress - Linear
An element that shows either determinate or indeterminate progress.
An element that shows either determinate or indeterminate progress.
To set up the progress correctly, you’ll need to understand its anatomy and how we name its parts.
Each part includes a
data-part
attribute to help identify them in the DOM.
Learn how to use the Progress
component in your project. Let’s take a look at
the most basic example:
Story not found
Story not found
Story not found
To set the progress’s initial value, set the defaultValue
prop to a number.
Story not found
Story not found
Story not found
By default, the maximum is 100
. If that’s not what you want, you can easily
specify a different bound by changing the value of the max
prop. You can do
the same with the minimum value by setting the min
prop.
For example, to show the user a progress from 10
to 30
, you can use:
Story not found
Story not found
Story not found
The progress component is determinate by default, with the value and max set to 50 and 100 respectively.
Set the state
to indeterminate
in Progress.Indicator
:
Story not found
Story not found
Story not found
Progress bars can only be interpreted by sighted users. To include a text
description to support assistive technologies like screen readers, use the
value
part in translations
.
Story not found
Story not found
Story not found
By default, the progress is assumed to be horizontal. To change the orientation to vertical, set the orientation property in the machine’s context to vertical.
Don’t forget to change the styles of the vertical progress by specifying its height
Story not found
Story not found
Story not found
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean | |
id The unique identifier of the machine. | string | |
ids The ids of the elements in the progress bar. Useful for composition. | Partial<{ root: string; track: string; label: string; circle: string }> | |
max The maximum allowed value of the progress bar. | number | |
min The minimum allowed value of the progress bar. | number | |
orientation The orientation of the element. | Orientation | "horizontal" |
translations The localized messages to use. | IntlTranslations | |
value The current value of the progress bar. | number |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
asChild Render as a different element type. | boolean |
Prop | Type | Default |
---|---|---|
state | ProgressState | |
asChild Render as a different element type. | boolean |
Next
Introduction