packages/react-components/react-progress/library/docs/Spec.md
The ProgressBar component is used to display the current progress of an operation flow, or show that an operation is currently being executed.
| Library | Component Name | Spec Link | Notes |
|---|---|---|---|
| Ant Design | Progress | Progress | Specifies the type, a combined progress component |
| Atlassian Design | Progress bar | ProgressBar | Defaults to determinate state, which turns green when value reaches 1. Has an indeterminate state |
| Bootstrap | Progress | Progress | Allows for multiple different animation styles on the same Progress bar |
| Carbon Design | Progress Indicator | ProgressIndicator | Determinate Progress that has steps, similar to a Slider |
| Fast | Progress | Progress | Combined Progress and Spinner component, has a determinate and indeterminate state |
| Lightning Design System | Progress Bar | ProgressBar | Has a vertical bar, only determinate, and can specify progress step |
| Semantic UI | Progress | Progress | Allows for success and error states, default rounded edges. No indeterminate form |
The existing components are:
ProgressIndicatorBasic example:
import { ProgressBar } from '@fluentui/react-progress';
function App() {
return <ProgressBar thickness="large" />;
}
There is a ProgressField component that adds a label, validation state(success, warning, error), and hint text to the ProgressBar.
You can use it like so:
import * as React from 'react';
import type { ProgressFieldProps } from '@fluentui/react-field';
import { ProgressField } from '@fluentui/react-field';
export const Default = (props: ProgressFieldProps) => (
<ProgressField
label="Example Progress field"
value={0.75}
validationState="success"
validationMessage="This is a success message"
hint="This is a hint message"
{...props}
/>
);
The ProgressBar is represented as a rounded rectangular area with an inner animated bar that either travels across the area indefinitely or animates up till a specified point
root - The root element of the ProgressBar, which also serves as the track for the Progress bar. The html element is a divbar - The div element that gets animated into a Progress bar. The html element is divSee API at ProgressBar.types.tsx.
<div class="fui-ProgressBar">
<!-- Bar for Progress -->
<div class="fui-ProgressBar__bar" />
</div>
See MIGRATION.md.
Display - The ProgressBar will use the following priority:
value prop will alter the ProgressBar from indeterminate to determinate.rtl support and will animate the progress bar from right to left if set.The ProgressBar is non-interactive.
Keyboard - Not keyboard focusable.
Mouse
Touch - Nothing
determinate ProgressBar has the proper aria attributes assigned to the element that will allow screen readers to get the max and current value of the ProgressBar.reduced-motion is active, the indeterminate ProgressBar will animate only once. Use ProgressField to add a description and hint message to the ProgressBar bar.