To add the ProgressBar
component to your app:
1 2import { ProgressBar } from '@forge/react';
A progress bar communicates the status of a system process.
Name | Type | Required | Description |
---|---|---|---|
appearance | "default" | "success" | "inverse" | No | Visual style of the progress bar. |
ariaLabel | string | No | Label associated with the progress bar, read by screen readers. |
isIndeterminate | boolean | No | Shows the progress bar in an indeterminate state when true. |
value | number | No | Sets the value of the progress bar, between 0 and 1 inclusive. |
The default appearance of a progress bar.
1 2const ProgressBarDefaultExample = () => { return <ProgressBar ariaLabel="Done: 3 of 10 issues" value={0.3} />; };
1 2const ProgressBarInverseExample = () => { return ( <Box backgroundColor="color.background.information.bold"> <ProgressBar appearance="inverse" ariaLabel="Done: 6 of 10 issues" value={0.6} /> </Box> ); };
Success indicates the completion of a process.
1 2const ProgressBarSuccessExample = () => { return ( <ProgressBar appearance="success" ariaLabel="Done: 10 of 10 issues" value={1} /> ); };
Indeterminate
progress bars display movement along the container until the process is finished.
1 2const ProgressBarIndeterminateExample = () => { return <ProgressBar ariaLabel="Loading issues" isIndeterminate />; };
When using the ProgressBar
component, we recommend keeping the following accessibility considerations in mind:
Rate this page: