Skip to main content

ProgressBar

A flexible progress bar component built with React and Tailwind CSS that visualizes completion status.

Installation

npm install @brightcodeui/beta-ui

Usage

75%

Props

PropTypeDefaultDescription
valuenumber0Current progress value (0-100)
maxnumber100Maximum value of the progress
minnumber0Minimum value of the progress
isAnimatedbooleanfalseEnables animation for striped progress bars
isIndeterminatebooleanfalseShows an indeterminate loading state
colorSchemestring'blue'Color theme ('blue', 'green', 'yellow', 'red', 'purple', 'gray')
sizestring'md'Size of the progress bar ('xs', 'sm', 'md', 'lg')
hasStripebooleanfalseAdds a striped pattern to the progress bar
showLabelbooleanfalseDisplays percentage text inside the progress bar
classNamestring''Additional CSS classes for customization

Accessibility

The component includes proper ARIA attributes:

  • role="progressbar"
  • aria-valuenow
  • aria-valuemin
  • aria-valuemax

Examples

Different Sizes

<ProgressBar value={60} size="xs" />
<ProgressBar value={60} size="sm" />
<ProgressBar value={60} size="md" />
<ProgressBar value={60} size="lg" />

Custom Styling

<ProgressBar 
value={40}
className="rounded-none shadow-lg"
/>