Circular Progress Indicator component for Element React
npm install @element-public/react-circular-progressCircular progress displays a specified or unspecified wait time as an animated ring.
Storybook CircularProgress Demos
- Verify that you have access to (https://docs.int.bayer.com/cloud/devops/artifactory/)[Bayer Artifactory]
- Verify your token is correctly set up in your .npmrc as per the link above
- Verify you have the @element scope configured in your .npmrc
- @element:registry=https://artifactory.bayer.com/artifactory/api/npm/npm-platforms-engineering/
- Install the component and themes bundles
- npm i @element/react-components @element/themes
- alternatively install the component individually along with the themes bundle npm i @element/react-circular-progress @element/themes
There are two variants of the Circular Progress indicator, Indeterminate and Determinate. Both variants represent the progress, on a scale of 0 to 1, of the completion of a task. The same objective can be accomplished with the Linear Progress indicator, depending on which fits or looks better in certain use cases. See Storybook demos for details and examples of each.
Indeterminate Circular Progress is a constantly spinning circle, as opposed to a static icon. It moves continuously, like an icon that represents something in the process of loading. Having an icon that shows active progress prevents the user from unnecessarily refreshing or navigating away from the current screen.
Determinate Circular Progress is a circle that increments periodically or when prompted by a user, as opposed to a circle that moves continuously. This indicator could be preferable to the Indeterminate Circular Progress indicator when it should only update with input or action from a user.
| Name | Type | Default | Required | Description |
| ------------- | ------- | -------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ariaLabel | string | 'Progress Indicator' | false | Accessibility label. |
| className | string | undefined | false | The css class name to be passed through to the component markup. |
| indicatorSize | string | 'lg' | false | The size of the progress indicator.
Accepted Values: sm, md, lg |
| open | boolean | true | false | Sets the visibility of the progress indicator. |
| progress | number | 0 | false | The current progress of a determinate progress indicator. Must be between 0 and 1. |
| themeColor | string | 'primary' | false | Color of the indicator stroke with 'primary' or 'secondary' theme color.
Accepted Values: primary, secondary, primary-variant, secondary-variant, two-color, two-color-variant, on-primary, on-secondary, on-success, on-danger, on-unknown-dark, on-unknown-light |
| variant | string | 'indeterminate' | false | An indeterminate CircularProgress indicator will continue spinning until closed. A determinate CircularProgress indicator will display the current progress.
Accepted Values: determinate, indeterminate |
| Name | Type | Default | Required | Deprecated | Description |
| ---- | ------ | --------- | -------- | ----------------------------------- | ----------------------------------- |
| size | string | undefined | false | Renamed, see indicatorSize instead. | The size of the progress indicator. |
| Description |
| ------------------------------------------------------------------------------- |
| variant: The original, pre v5, variant prop has been renamed to themeColor. |