Bootstrap 5 Progress Bar

Basic progress bar

Progress bars can be used to display the progress of a user in a process.

To create a default progress bar, add .progress class to the container element and set .progress-bar class to its child elements. Please use the CSS width property to set the width of the progress bar:

Example

<div class="progress">
  <div class="progress-bar" style="width:70%"></div>
</div>

Try It Yourself

Progress bar height

The default height of the progress bar is 1rem(usually) 16px). Please use CSS height property to change it.

Tip:Note that you must set the same height for the progress container and the progress bar:

Example

<div class="progress" style="height:20px">
  <div class="progress-bar" style="width:40%;height:20px"></div>
</div>

Try It Yourself

Progress bar labels

Add text within the progress bar to display the visible percentage:

Example

<div class="progress">
  <div class="progress-bar" style="width:70%">70%</div>
</div>

Try It Yourself

Colored progress bars

By default, the progress bar is blue (primary). Use any context background class to change its color:

Example

<!-- Blue -->
<div class="progress">
  <div class="progress-bar" style="width:10%"></div>
</div>
<!-- Green -->
<div class="progress">
  <div class="progress-bar bg-success" style="width:20%"></div>
</div>
<!-- Turquoise -->
<div class="progress">
  <div class="progress-bar bg-info" style="width:30%"></div>
</div>
<!-- Orange -->
<div class="progress">
   <div class="progress-bar bg-warning" style="width:40%"></div>
</div>
<!-- Red -->
<div class="progress">
  <div class="progress-bar bg-danger" style="width:50%"></div>
</div>
<!-- White -->
<div class="progress border">
  <div class="progress-bar bg-white" style="width:60%"></div>
</div>
<!-- Grey -->
<div class="progress">
  <div class="progress-bar bg-secondary" style="width:70%"></div>
</div>
<!-- Light Grey -->
<div class="progress border">
  <div class="progress-bar bg-light" style="width:80%"></div>
</div>
<!-- Dark Grey -->
<div class="progress">
  <div class="progress-bar bg-dark" style="width:90%"></div>
</div>

Try It Yourself

Striped Progress Bar

Please use .progress-bar-striped Class to add stripes to the progress bar:

Example

<div class="progress">
  <div class="progress-bar progress-bar-striped" style="width:40%"></div>
</div>

Try It Yourself

Progress Bar Animation

Please add .progress-bar-animated Class to make progress bar animation:

Example

<div class="progress-bar progress-bar-striped progress-bar-animated" style="width:40%"></div>

Try It Yourself

Multiple Progress Bars

Progress bars can also be stacked:

Example

<div class="progress">
  <div class="progress-bar bg-success" style="width:40%">
    Free Space
  </div>
  <div class="progress-bar bg-warning" style="width:10%">
    Warning
  </div>
  <div class="progress-bar bg-danger" style="width:20%">
    Danger
  </div>
</div>

Try It Yourself