Skip to content

Progressbar

<bh-progressbar>

The Progress Bar component provides a visual indicator of completion status for tasks, processes, or operations. It’s highly customizable with various styles, animations, and display options.

Features

  • Multiple size variations (xs, sm, md, lg, xl)
  • Color variants (primary, secondary, success, danger, warning, info)
  • Animation and striped effects
  • Value display options
  • Customizable appearance with elevation, shadows, and border radius
  • Indeterminate state for unknown progress
  • Label positioning options

Basic Usage

Interactive Playground

Experiment with different properties of the progress bar component.

Basic Properties

Toggle Options

Custom Colors

Size Variations

The component supports both named sizes and custom pixel values.

Extra Small:
Small:
Medium:
Large:
Extra Large:

Color Variants

Advanced Styling

Customize the appearance with elevation, shadows, custom colors, and more.

Indeterminate Progress

Use the indeterminate property when the progress value is unknown.

Properties

PropertyTypeDescription
animatedbooleanAdds animation to the progress bar
borderRadiusstringCustom border radius (overrides rounded)
colorstringCustom color for the progress bar (CSS color or gradient)
elevationbooleanAdds a subtle shadow effect
heightstringHeight of the progress bar (xs, sm, md, lg, xl, or custom value)
indeterminatebooleanShows an animated indeterminate progress state
labelstringText label for the progress bar
labelPositionstringPosition of the label (“top” or “bottom”)
maxnumberMaximum value
minnumberMinimum value
roundedbooleanApplies rounded corners
shadowstringCustom shadow value (used with elevation)
showValuebooleanShows the current value
stripedbooleanAdds a striped pattern
thicknessstringAlternative to height
trackColorstringCustom color for the track
valuenumberCurrent progress value
valuePrefixstringPrefix for the displayed value
valueSuffixstringSuffix for the displayed value
variantstringColor variant (primary, secondary, success, danger, warning, info)
widthstringWidth of the progress bar

Size Reference

Size NameEquivalent
xs4px
sm8px
md16px
lg24px
xl32px

JavaScript API

You can programmatically control the progress bar using JavaScript:

// Get the progress bar element
const progressBar = document.querySelector('bh-progressbar');
// Update the value
progressBar.value = 75;
// Toggle animation
progressBar.animated = true;
// Toggle striped pattern
progressBar.striped = true;
// Change the color
progressBar.color = '#ff3366';
// Change the size
progressBar.height = 'lg';