A progress bar component that can be used to show the progress of a task.

Importing

The component can be imported via:

import { ProgressBar } from '@customerio/pluma-components/react';

Usage

<ProgressBar value={50} />

Size

Progress bars can be either medium (default) or small.

<ProgressBar value={50} size="small" />
<ProgressBar value={50} size="small" />

Max

The maximum value of the progress bar can be set using the max prop. By default, the maximum value is 100.

<ProgressBar value={50} max={200} />

Accessibility

To screen readers, the progress bar will announce the percentage of completion. The aria-label prop can be used to provide a more descriptive label.

<ProgressBar value={50} ariaLabel="50% complete" />

If it has a label, you can also use the ariaLabelledby prop to reference the label element.

50% complete
<Label id="label">50% complete</Label>
<ProgressBar value={50} ariaLabelledby="label" />

API

Aria label for the progress bar

Aria labelled by for the progress bar

Default:100

The maximum value of the progress bar

Default:medium

Size variant of the progress bar medium and small are deprecated, use md and sm instead.

Default:0

The value of the progress bar

On this page