Progress Bars & Spinners

Bootstrap Framework 7 min min read Updated: Nov 16, 2026 Beginner
Progress Bars & Spinners
Beginner Topic 14 of 14

Progress Bar

A progress bar shows how much of a task is completed, such as a file upload or a skill level.

html <div class="progress" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"> <div class="progress-bar" style="width: 60%">60%</div> </div>
  • The outer .progress is the track
  • The inner .progress-bar is the filled part. Its width sets the percentage

Colors, Height and Stripes

html <div class="progress mb-2" style="height: 25px;"> <div class="progress-bar bg-success" style="width: 75%">75%</div> </div> <div class="progress mb-2"> <div class="progress-bar progress-bar-striped bg-info" style="width: 50%"></div> </div> <div class="progress"> <div class="progress-bar progress-bar-striped progress-bar-animated bg-warning" style="width: 85%"></div> </div>

Multiple Bars

html <div class="progress-stacked"> <div class="progress" style="width: 30%"> <div class="progress-bar">30%</div> </div> <div class="progress" style="width: 20%"> <div class="progress-bar bg-success">20%</div> </div> </div>

Spinners

A spinner tells the user that something is loading.

html <div class="spinner-border text-primary" role="status"> <span class="visually-hidden">Loading...</span> </div> <div class="spinner-grow text-danger" role="status"> <span class="visually-hidden">Loading...</span> </div> <!-- Small spinner --> <div class="spinner-border spinner-border-sm"></div>

Centered Loading Screen

html <div class="d-flex justify-content-center align-items-center vh-100"> <div class="spinner-border" style="width: 3rem; height: 3rem;" role="status"></div> </div>
Result

A blue bar filled to 60%, striped moving bars and spinning circle loaders.

Conclusion

Progress bars and spinners improve user experience because they show that the system is working. Always add the hidden text for screen readers.

Quick Summary: progress + progress-bar with a width percentage. Use spinner-border or spinner-grow for loading states.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators