loading

BS Progress Bars

Basic Progress Bar

A progress bar can be used to indicate how far along a user is in a process.

Bootstrap offers numerous styles of progress bars.

The default progress bar in Bootstrap looks like this:

------Button mukava -----

To make a default progress bar, apply the .progress class to a <div> element:

Example

				
					<div class="progress">
  <div class="progress-bar" role="progressbar" aria-valuenow="70"
  aria-valuemin="0" aria-valuemax="100" style="width:70%">
    <span class="sr-only">70% Complete</span>
  </div>
</div>
				
			

Note:

Internet Explorer 9 and earlier do not support progress bars (because they employ CSS3 transitions and animations to produce some of their effects).

Note:

Please keep in mind that using the aria-* attributes will help improve accessibility for persons using screen readers.

Progress Bar With Label

A progress bar with a label resembles this:

----- Button mukava ------

Remove the .sr-only class from the progress bar to display a visible percentage:

Example

				
					<div class="progress">
  <div class="progress-bar" role="progressbar" aria-valuenow="70"
  aria-valuemin="0" aria-valuemax="100" style="width:70%">
    70%
  </div>
</div>
				
			

Colored Progress Bars

Progress bars can be used with the following contextual classes:

  • .progress-bar-success
  • .progress-bar-info
  • .progress-bar-warning
  • .progress-bar-danger

------Button mukava -----

The following example demonstrates how to generate progress bars using different contextual classes:

Example

				
					<div class="progress">
  <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40"
  aria-valuemin="0" aria-valuemax="100" style="width:40%">
    40% Complete (success)
  </div>
</div>

<div class="progress">
  <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="50"
  aria-valuemin="0" aria-valuemax="100" style="width:50%">
    50% Complete (info)
  </div>
</div>

<div class="progress">
  <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
  aria-valuemin="0" aria-valuemax="100" style="width:60%">
    60% Complete (warning)
  </div>
</div>

<div class="progress">
  <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="70"
  aria-valuemin="0" aria-valuemax="100" style="width:70%">
    70% Complete (danger)
  </div>
</div>
				
			

Striped Progress Bars

Progress bars can also be striped:

----- Button mukava ------

Add class .progress-bar-striped to add stripes to the progress bars:

Example

				
					<div class="progress">
  <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar"
  aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:40%">
    40% Complete (success)
  </div>
</div>

<div class="progress">
  <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar"
  aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width:50%">
    50% Complete (info)
  </div>
</div>

<div class="progress">
  <div class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar"
  aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width:60%">
    60% Complete (warning)
  </div>
</div>

<div class="progress">
  <div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar"
  aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:70%">
    70% Complete (danger)
  </div>
</div>
				
			

Animated Progress Bar

------Button mukava -----

Add class .active to animate the progress bar:

Example

				
					<div class="progress">
  <div class="progress-bar progress-bar-striped active" role="progressbar"
  aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:40%">
    40%
  </div>
</div>
				
			

Stacked Progress Bars

Progress bars can also be layered.

----- Button mukava ------

To create a stacked progress bar, place numerous bars into the same <div class=”progress”>.

Example

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

BS Progress Bars

Or copy link

Explore Topic