Bootstrap 5 Progress
Progress
Documentation and examples for using Bootstrap custom progress bars featuring support for stacked bars, animated backgrounds, and text labels.
🤖 Looking for the LLM-optimized version?View llm.md
Other frameworks
CoreUI components are available as native Angular, React, and Vue components. To learn more please visit the following pages.
How it works
Progress components are built with two HTML elements, some CSS to set the width, and a few attributes. We don’t usethe HTML5<progress>
element, ensuring you can stack progress bars, animate them, and place text labels over them.
- We use the
.progress
as a wrapper to indicate the max value of the progress bar. - We use the inner
.progress-bar
to indicate the progress so far. - The
.progress-bar
requires an inline style, utility class, or custom CSS to set their width. - The
.progress-bar
also requires somerole
andaria
attributes to make it accessible.
Put that all together, and you have the following examples.
<divclass="progress"><divclass="progress-bar"role="progressbar"aria-valuenow="0"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar"role="progressbar"style="width: 25%"aria-valuenow="25"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar"role="progressbar"style="width: 50%"aria-valuenow="50"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar"role="progressbar"style="width: 75%"aria-valuenow="75"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar"role="progressbar"style="width: 100%"aria-valuenow="100"aria-valuemin="0"aria-valuemax="100"></div></div>
Bootstrap provides a handful ofutilities for setting width. Depending on your needs, these may help with quickly configuring progress.
<divclass="progress"><divclass="progress-bar w-75"role="progressbar"aria-valuenow="75"aria-valuemin="0"aria-valuemax="100"></div></div>
Labels
Add labels to your progress bars by placing text within the.progress-bar
.
<divclass="progress"><divclass="progress-bar"role="progressbar"style="width: 25%;"aria-valuenow="25"aria-valuemin="0"aria-valuemax="100">25%</div></div>
Height
We only set aheight
value on the.progress
, so if you change that value the inner.progress-bar
will automatically resize accordingly.
<divclass="progress"style="height: 1px;"><divclass="progress-bar"role="progressbar"style="width: 25%;"aria-valuenow="25"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"style="height: 20px;"><divclass="progress-bar"role="progressbar"style="width: 25%;"aria-valuenow="25"aria-valuemin="0"aria-valuemax="100"></div></div>
Backgrounds
Use background utility classes to change the appearance of individual progress bars.
<divclass="progress"><divclass="progress-bar bg-success"role="progressbar"style="width: 25%"aria-valuenow="25"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar bg-info"role="progressbar"style="width: 50%"aria-valuenow="50"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar bg-warning"role="progressbar"style="width: 75%"aria-valuenow="75"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar bg-danger"role="progressbar"style="width: 100%"aria-valuenow="100"aria-valuemin="0"aria-valuemax="100"></div></div>
Multiple bars
Include multiple progress bars in a progress component if you need.
<divclass="progress"><divclass="progress-bar"role="progressbar"style="width: 15%"aria-valuenow="15"aria-valuemin="0"aria-valuemax="100"></div><divclass="progress-bar bg-success"role="progressbar"style="width: 30%"aria-valuenow="30"aria-valuemin="0"aria-valuemax="100"></div><divclass="progress-bar bg-info"role="progressbar"style="width: 20%"aria-valuenow="20"aria-valuemin="0"aria-valuemax="100"></div></div>
Striped
Add.progress-bar-striped
to any.progress-bar
to apply a stripe via CSS gradient over the progress bar’s background color.
<divclass="progress"><divclass="progress-bar progress-bar-striped"role="progressbar"style="width: 10%"aria-valuenow="10"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar progress-bar-striped bg-success"role="progressbar"style="width: 25%"aria-valuenow="25"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar progress-bar-striped bg-info"role="progressbar"style="width: 50%"aria-valuenow="50"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar progress-bar-striped bg-warning"role="progressbar"style="width: 75%"aria-valuenow="75"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress"><divclass="progress-bar progress-bar-striped bg-danger"role="progressbar"style="width: 100%"aria-valuenow="100"aria-valuemin="0"aria-valuemax="100"></div></div>
Animated stripes
The striped gradient can also be animated. Add.progress-bar-animated
to.progress-bar
to animate the stripes right to left via CSS3 animations.
<divclass="progress"><divclass="progress-bar progress-bar-striped progress-bar-animated"role="progressbar"aria-valuenow="75"aria-valuemin="0"aria-valuemax="100"style="width: 75%"></div></div>
Progress group
<divclass="progress-group mb-4"><divclass="progress-group-prepend"><spanclass="text-body-secondary small"> Title</span></div><divclass="progress-group-bars"><divclass="progress progress-thin"><divclass="progress-bar bg-info"role="progressbar"style="width: 34%"aria-valuenow="34"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress progress-thin"><divclass="progress-bar bg-danger"role="progressbar"style="width: 78%"aria-valuenow="78"aria-valuemin="0"aria-valuemax="100"></div></div></div></div><divclass="progress-group mb-4"><divclass="progress-group-prepend"><spanclass="text-body-secondary small"> Title</span></div><divclass="progress-group-bars"><divclass="progress progress-thin"><divclass="progress-bar bg-info"role="progressbar"style="width: 56%"aria-valuenow="56"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress progress-thin"><divclass="progress-bar bg-danger"role="progressbar"style="width: 94%"aria-valuenow="94"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress progress-thin"><divclass="progress-bar bg-success"role="progressbar"style="width: 67%"aria-valuenow="67"aria-valuemin="0"aria-valuemax="100"></div></div></div></div><divclass="progress-group mb-4"><divclass="progress-group-prepend"><spanclass="text-body-secondary small"> Title</span></div><divclass="progress-group-bars"><divclass="progress progress-thin"><divclass="progress-bar bg-info"role="progressbar"style="width: 56%"aria-valuenow="56"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress progress-thin"><divclass="progress-bar bg-danger"role="progressbar"style="width: 94%"aria-valuenow="94"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress progress-thin"><divclass="progress-bar bg-success"role="progressbar"style="width: 67%"aria-valuenow="67"aria-valuemin="0"aria-valuemax="100"></div></div><divclass="progress progress-thin"><divclass="progress-bar bg-warning"role="progressbar"style="width: 17%"aria-valuenow="17"aria-valuemin="0"aria-valuemax="100"></div></div></div></div>
<divclass="progress-group"><divclass="progress-group-header"><iclass="cil-user progress-group-icon me-2"></i><div>Male</div><divclass="ms-auto font-weight-bold">43%</div></div><divclass="progress-group-bars"><divclass="progress progress-thin"><divclass="progress-bar bg-warning"role="progressbar"style="width: 43%"aria-valuenow="43"aria-valuemin="0"aria-valuemax="100"></div></div></div></div>
<divclass="progress-group"><divclass="progress-group-header align-items-end"><iclass="cil-globe-alt progress-group-icon me-2"></i><div>Organic Search</div><divclass="ms-auto font-weight-bold me-2">191.235</div><divclass="text-muted small">(56%)</div></div><divclass="progress-group-bars"><divclass="progress progress-thin"><divclass="progress-bar bg-success"role="progressbar"style="width: 56%"aria-valuenow="56"aria-valuemin="0"aria-valuemax="100"></div></div></div></div>
Customizing
CSS variables
Progress bars use local CSS variables on.progress
for enhanced real-time customization. Values for the CSS variables are set via SASS, so Sass customization is still supported, too.
--cui-progress-height:#{$progress-height};@include rfs($progress-font-size,--cui-progress-font-size);--cui-progress-bg:#{$progress-bg};--cui-progress-border-radius:#{$progress-border-radius};--cui-progress-box-shadow:#{$progress-box-shadow};--cui-progress-bar-color:#{$progress-bar-color};--cui-progress-bar-bg:#{$progress-bar-bg};--cui-progress-bar-transition:#{$progress-bar-transition};
SASS variables
$progress-height:1rem;$progress-font-size:$font-size-base*.75;$progress-bg:var(--#{$prefix}secondary-bg);$progress-border-radius:var(--#{$prefix}border-radius);$progress-box-shadow:var(--#{$prefix}box-shadow-inset);$progress-bar-color:$white;$progress-bar-bg:var(--#{$prefix}primary);$progress-bar-animation-timing:1slinearinfinite;$progress-bar-transition:width.6sease;// TODO: clean-up ???$progress-group-margin-bottom:$spacer;$progress-group-header-margin-bottom:$spacer*.25;
Keyframes
Used for creating the CSS animations for.progress-bar-animated
. Included inscss/_progress-bar.scss
.
@if$enable-transitions{@keyframesprogress-bar-stripes{0%{background-position-x:var(--#{$prefix}progress-height);}}}
CoreUI vs Bootstrap
While this Progress component is fully compatible with Bootstrap and follows its core principles, CoreUI delivers a more complete solution for modern app development.
What sets CoreUI apart from Bootstrap?
- ✅Fully compatible with Bootstrap – Built directly on Bootstrap, all classes and behaviors work as expected.
- 🧠Framework-native versions – CoreUI provides dedicated libraries forReact.js,Vue.js, andAngular, unlike Bootstrap which relies on third-party plugins for JavaScript frameworks.
- 👨💻Maintained by a full-time team – CoreUI is developed as a professional product, not a volunteer-driven project.
- 📦More built-in components – Includes additional ready-to-use components like range sliders, multi-selects, steppers, etc.
- 🛠️Sass Modules support today – CoreUI already supports Sass Modules, which are planned for Bootstrap 6.
- 🌍Better LTR/RTL support – Uses modern CSS logical properties for seamless bidirectional layout support.
- 🔒LTS (Long-Term Support) – Bootstrap now offers LTS only via paid third parties like HeroDevs, while CoreUI continues to offer long-term support natively and for free.
Whether you’re building internal tools, dashboards, or SaaS platforms — CoreUI combines the familiarity of Bootstrap with a more powerful, scalable, and production-ready ecosystem.
👉Explore CoreUI Bootstrap Components
👉Compare CoreUI vs Bootstrap