Examples
Props
Progress
Name | Type | Default | Description |
---|---|---|---|
aria-label | string | null | Adds accessible text to the ProgressBar. Required when title not used and there is not any label associated with the progress bar |
aria-labelledby | string | null | Associates the ProgressBar with it's label for accessibility purposes. Required when title not used |
className | string | '' | Classname for progress component. |
helperText | React.ReactNode | Content which can be used to convey additional information about the progress component. We recommend the helper text component as it was designed for this purpose. | |
id | string | '' | DOM id for progress component. |
isTitleTruncated | boolean | false | Indicate whether to truncate the string title |
label | React.ReactNode | null | Text description of current progress value to display instead of percentage. |
max | number | 100 | Maximum value of progress. |
measureLocation | 'outside' | 'inside' | 'top' | 'none' | ProgressMeasureLocation.top | Where the measure percent will be located. |
min | number | 0 | Minimal value of progress. |
size | 'sm' | 'md' | 'lg' | null | Size variant of progress. |
title | React.ReactNode | '' | Title above progress. The isTitleTruncated property will only affect string titles. Node title truncation must be handled manually. |
tooltipPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top' | Position of the tooltip which is displayed if title is truncated |
value | number | 0 | Actual value of progress. |
valueText | string | null | Accessible text description of current progress value, for when value is not a percentage. Use with label. |
variant | 'danger' | 'success' | 'warning' | null | Status variant of progress. |
CSS variables
Expand or collapse column | Selector | Variable | Value | |
---|---|---|---|---|
.pf-v5-c-progress | --pf-v5-c-progress--GridGap | 1rem | ||
--pf-v5-c-progress--GridGap --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress__bar--before--BackgroundColor | #06c | ||
--pf-v5-c-progress__bar--before--BackgroundColor --pf-v5-global--primary-color--100 $pf-v5-global--primary-color--100 $pf-v5-color-blue-400 #06c | ||||
.pf-v5-c-progress | --pf-v5-c-progress__bar--Height | 1rem | ||
--pf-v5-c-progress__bar--Height --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress__bar--BackgroundColor | #fff | ||
--pf-v5-c-progress__bar--BackgroundColor --pf-v5-global--BackgroundColor--light-100 $pf-v5-global--BackgroundColor--light-100 $pf-v5-color-white #fff | ||||
.pf-v5-c-progress | --pf-v5-c-progress__measure--m-static-width--MinWidth | 4.5ch | ||
.pf-v5-c-progress | --pf-v5-c-progress__status--Gap | 0.5rem | ||
--pf-v5-c-progress__status--Gap --pf-v5-global--spacer--sm $pf-v5-global--spacer--sm pf-size-prem(8px) 0.5rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress__status-icon--Color | #151515 | ||
--pf-v5-c-progress__status-icon--Color --pf-v5-global--Color--100 $pf-v5-global--Color--100 $pf-v5-color-black-900 #151515 | ||||
.pf-v5-c-progress | --pf-v5-c-progress__bar--before--Opacity | .2 | ||
.pf-v5-c-progress | --pf-v5-c-progress__indicator--Height | 1rem | ||
--pf-v5-c-progress__indicator--Height --pf-v5-c-progress__bar--Height --pf-v5-global--spacer--md $pf-v5-global--spacer--md pf-size-prem(16px) 1rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress__indicator--BackgroundColor | #06c | ||
--pf-v5-c-progress__indicator--BackgroundColor --pf-v5-c-progress__bar--before--BackgroundColor --pf-v5-global--primary-color--100 $pf-v5-global--primary-color--100 $pf-v5-color-blue-400 #06c | ||||
.pf-v5-c-progress | --pf-v5-c-progress__helper-text--MarginTop | calc(0.25rem - 1rem) | ||
--pf-v5-c-progress__helper-text--MarginTop calc(--pf-v5-global--spacer--xs - --pf-v5-c-progress--GridGap) calc($pf-v5-global--spacer--xs - --pf-v5-global--spacer--md) calc($pf-v5-global--spacer--xs - $pf-v5-global--spacer--md) calc(pf-size-prem(4px) - pf-size-prem(16px)) calc(0.25rem - 1rem) | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-success__bar--BackgroundColor | #3e8635 | ||
--pf-v5-c-progress--m-success__bar--BackgroundColor --pf-v5-global--success-color--100 $pf-v5-global--success-color--100 $pf-v5-color-green-500 #3e8635 | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-warning__bar--BackgroundColor | #f0ab00 | ||
--pf-v5-c-progress--m-warning__bar--BackgroundColor --pf-v5-global--warning-color--100 $pf-v5-global--warning-color--100 $pf-v5-color-gold-400 #f0ab00 | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-danger__bar--BackgroundColor | #c9190b | ||
--pf-v5-c-progress--m-danger__bar--BackgroundColor --pf-v5-global--danger-color--100 $pf-v5-global--danger-color--100 $pf-v5-color-red-100 #c9190b | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-success__status-icon--Color | #3e8635 | ||
--pf-v5-c-progress--m-success__status-icon--Color --pf-v5-global--success-color--100 $pf-v5-global--success-color--100 $pf-v5-color-green-500 #3e8635 | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-warning__status-icon--Color | #f0ab00 | ||
--pf-v5-c-progress--m-warning__status-icon--Color --pf-v5-global--warning-color--100 $pf-v5-global--warning-color--100 $pf-v5-color-gold-400 #f0ab00 | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-danger__status-icon--Color | #c9190b | ||
--pf-v5-c-progress--m-danger__status-icon--Color --pf-v5-global--danger-color--100 $pf-v5-global--danger-color--100 $pf-v5-color-red-100 #c9190b | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-inside__indicator--MinWidth | 2rem | ||
--pf-v5-c-progress--m-inside__indicator--MinWidth --pf-v5-global--spacer--xl $pf-v5-global--spacer--xl pf-size-prem(32px) 2rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-inside__measure--Color | #fff | ||
--pf-v5-c-progress--m-inside__measure--Color --pf-v5-global--Color--light-100 $pf-v5-global--Color--light-100 $pf-v5-color-white #fff | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-success--m-inside__measure--Color | #fff | ||
--pf-v5-c-progress--m-success--m-inside__measure--Color --pf-v5-global--Color--light-100 $pf-v5-global--Color--light-100 $pf-v5-color-white #fff | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-warning--m-inside__measure--Color | #151515 | ||
--pf-v5-c-progress--m-warning--m-inside__measure--Color --pf-v5-global--Color--dark-100 $pf-v5-global--Color--dark-100 $pf-v5-color-black-900 #151515 | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-inside__measure--FontSize | 0.875rem | ||
--pf-v5-c-progress--m-inside__measure--FontSize --pf-v5-global--FontSize--sm $pf-v5-global--FontSize--sm pf-font-prem(14px) 0.875rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-outside__measure--FontSize | 0.875rem | ||
--pf-v5-c-progress--m-outside__measure--FontSize --pf-v5-global--FontSize--sm $pf-v5-global--FontSize--sm pf-font-prem(14px) 0.875rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-sm__bar--Height | 0.5rem | ||
--pf-v5-c-progress--m-sm__bar--Height --pf-v5-global--spacer--sm $pf-v5-global--spacer--sm pf-size-prem(8px) 0.5rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-sm__description--FontSize | 0.875rem | ||
--pf-v5-c-progress--m-sm__description--FontSize --pf-v5-global--FontSize--sm $pf-v5-global--FontSize--sm pf-font-prem(14px) 0.875rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-sm__measure--FontSize | 0.875rem | ||
--pf-v5-c-progress--m-sm__measure--FontSize --pf-v5-global--FontSize--sm $pf-v5-global--FontSize--sm pf-font-prem(14px) 0.875rem | ||||
.pf-v5-c-progress | --pf-v5-c-progress--m-lg__bar--Height | 1.5rem | ||
--pf-v5-c-progress--m-lg__bar--Height --pf-v5-global--spacer--lg $pf-v5-global--spacer--lg pf-size-prem(24px) 1.5rem | ||||
.pf-v5-c-progress.pf-m-sm | --pf-v5-c-progress__bar--Height | 0.5rem | ||
--pf-v5-c-progress__bar--Height --pf-v5-c-progress--m-sm__bar--Height --pf-v5-global--spacer--sm $pf-v5-global--spacer--sm pf-size-prem(8px) 0.5rem | ||||
.pf-v5-c-progress.pf-m-lg | --pf-v5-c-progress__bar--Height | 1.5rem | ||
--pf-v5-c-progress__bar--Height --pf-v5-c-progress--m-lg__bar--Height --pf-v5-global--spacer--lg $pf-v5-global--spacer--lg pf-size-prem(24px) 1.5rem | ||||
.pf-v5-c-progress.pf-m-success | --pf-v5-c-progress__bar--before--BackgroundColor | #3e8635 | ||
--pf-v5-c-progress__bar--before--BackgroundColor --pf-v5-c-progress--m-success__bar--BackgroundColor --pf-v5-global--success-color--100 $pf-v5-global--success-color--100 $pf-v5-color-green-500 #3e8635 | ||||
.pf-v5-c-progress.pf-m-success | --pf-v5-c-progress__status-icon--Color | #3e8635 | ||
--pf-v5-c-progress__status-icon--Color --pf-v5-c-progress--m-success__status-icon--Color --pf-v5-global--success-color--100 $pf-v5-global--success-color--100 $pf-v5-color-green-500 #3e8635 | ||||
.pf-v5-c-progress.pf-m-success | --pf-v5-c-progress--m-inside__measure--Color | #fff | ||
--pf-v5-c-progress--m-inside__measure--Color --pf-v5-c-progress--m-success--m-inside__measure--Color --pf-v5-global--Color--light-100 $pf-v5-global--Color--light-100 $pf-v5-color-white #fff | ||||
.pf-v5-c-progress.pf-m-warning | --pf-v5-c-progress__bar--before--BackgroundColor | #f0ab00 | ||
--pf-v5-c-progress__bar--before--BackgroundColor --pf-v5-c-progress--m-warning__bar--BackgroundColor --pf-v5-global--warning-color--100 $pf-v5-global--warning-color--100 $pf-v5-color-gold-400 #f0ab00 | ||||
.pf-v5-c-progress.pf-m-warning | --pf-v5-c-progress__status-icon--Color | #f0ab00 | ||
--pf-v5-c-progress__status-icon--Color --pf-v5-c-progress--m-warning__status-icon--Color --pf-v5-global--warning-color--100 $pf-v5-global--warning-color--100 $pf-v5-color-gold-400 #f0ab00 | ||||
.pf-v5-c-progress.pf-m-warning | --pf-v5-c-progress--m-inside__measure--Color | #151515 | ||
--pf-v5-c-progress--m-inside__measure--Color --pf-v5-c-progress--m-warning--m-inside__measure--Color --pf-v5-global--Color--dark-100 $pf-v5-global--Color--dark-100 $pf-v5-color-black-900 #151515 | ||||
.pf-v5-c-progress.pf-m-danger | --pf-v5-c-progress__bar--before--BackgroundColor | #c9190b | ||
--pf-v5-c-progress__bar--before--BackgroundColor --pf-v5-c-progress--m-danger__bar--BackgroundColor --pf-v5-global--danger-color--100 $pf-v5-global--danger-color--100 $pf-v5-color-red-100 #c9190b | ||||
.pf-v5-c-progress.pf-m-danger | --pf-v5-c-progress__status-icon--Color | #c9190b | ||
--pf-v5-c-progress__status-icon--Color --pf-v5-c-progress--m-danger__status-icon--Color --pf-v5-global--danger-color--100 $pf-v5-global--danger-color--100 $pf-v5-color-red-100 #c9190b |
View source on GitHub