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-partattribute 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 foundStory not foundStory not foundTo set the progress’s initial value, set the defaultValue prop to a number.
Story not foundStory not foundStory not foundBy 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 foundStory not foundStory not foundThe 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 foundStory not foundStory not foundProgress 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 foundStory not foundStory not foundBy 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 foundStory not foundStory not found| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean | |
idThe unique identifier of the machine. | string | |
idsThe ids of the elements in the progress bar. Useful for composition. | Partial<{ root: string; track: string; label: string; circle: string }> | |
maxThe maximum allowed value of the progress bar. | number | |
minThe minimum allowed value of the progress bar. | number | |
orientationThe orientation of the element. | Orientation | "horizontal" |
translationsThe localized messages to use. | IntlTranslations | |
valueThe current value of the progress bar. | number |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
asChildRender as a different element type. | boolean |
| Prop | Type | Default |
|---|---|---|
state | ProgressState | |
asChildRender as a different element type. | boolean |
Next
Introduction