Progress
The Progress
component in Pearl UI is used to display the progress status for a task that takes a long time or consists of several steps. It is a visual indicator of completion percentage.
#
Importimport { Progress } from "pearl-ui";
#
Usage// Basic usage of Progress<Progress />
// Customizing Progress with value prop<Progress value={50} />
#
Progress SizesThe size
prop allows you to adjust the size of the progress bar. You can set the value to the keys available in
<Progress size="xs" /><Progress size="s" /><Progress size="m" /><Progress size="l" />
#
Progress VariantsThe variant
prop allows you to change the appearance of the progress bar. You can set the value to the keys available in
<Progress variant="filled" value={50} /><Progress variant="outline" />
#
Progress color schemeYou can add colorScheme
prop to any progress bar to apply any color that exists in the theme
.
// Using Progress with different color schemes<Progress colorScheme="success" /><Progress colorScheme="secondary" />
#
AccessibilityProgress
has a role
set to progressbar
to denote that it is a progress.
// Example: Progress with 50% completion<Progress value={50} />
#
Example#
Progress Component Properties#
Supported Styling PropertiesThe Progress
component is built upon the Box component, hence all properties of Box can be applied to it.
#
Additional PropertiesName | Required | Type | Default | Description |
---|---|---|---|---|
value | No | 0 | Value of the current progress (Between 0 and 100). | |
size | No | "m" | Defines the size of the progress bar. | |
variant | No | "filled" | Specifies the variant of the progress bar. | |
colorScheme | No | "primary" | Specifies the color scheme of the progress bar. |