Progress Bars
Basic Example
Default progress bar.
<p>Default progress bar.</p>
<div class="progress">
<div class="progress-bar bg-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
<span class="sr-only">60% Complete</span>
</div>
</div>
With Label
Remove the <span>
with .sr-only
class from within the progress bar to show a visible percentage.
<p>Remove the <code><span></code> with <code>.sr-only</code> class from within the progress bar to show a visible percentage.</p>
<div class="progress progress-md">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width: 70%;">
70%
</div>
</div>
Animated
Add .progress-bar-animated
to .progress-bar-striped
to animate the stripes right to left.
<p>Add <code>.progress-bar-animated</code> to <code>.progress-bar-striped</code> to animate the stripes right to left.</p>
<div class="progress progress-md">
<div class="progress-bar bg-success progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
<span class="sr-only">45% Complete</span>
</div>
</div>
Stacked
Place multiple bars into the same .progress
to stack them.
<p>Place multiple bars into the same <code>.progress</code> to stack them.</p>
<div class="progress">
<div class="progress-bar bg-success" style="width: 35%">
<span class="sr-only">35% Complete (success)</span>
</div>
<div class="progress-bar bg-warning progress-bar-striped" style="width: 20%">
<span class="sr-only">20% Complete (warning)</span>
</div>
<div class="progress-bar bg-danger" style="width: 10%">
<span class="sr-only">10% Complete (danger)</span>
</div>
</div>
Rounded
You can crate rounded progress bars by adding .progress-rounded
class to .progress
<p>You can crate rounded progress bars by adding <code>.progress-rounded</code> class to <code>.progress</code></p>
<div class="progress progress-rounded">
<div class="progress-bar progress-bar-primary" style="width: 35%">
<span class="sr-only">35%</span>
</div>
</div>
Contextual Alternatives
Progress bars use some of the same button and alert classes for consistent styles.
<p>Progress bars use some of the same button and alert classes for consistent styles.</p>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete (success)</span>
</div>
</div>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span class="sr-only">20% Complete</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span>
</div>
</div>
<div class="progress">
<div class="progress-bar bg-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
<span class="sr-only">80% Complete (danger)</span>
</div>
</div>
Striped
Uses a gradient to create a striped effect. Not available in IE8.
<p>Uses a gradient to create a striped effect. Not available in IE8.</p>
<div class="progress progress-md">
<div class="progress-bar bg-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete (success)</span>
</div>
</div>
<div class="progress progress-md">
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span class="sr-only">20% Complete</span>
</div>
</div>
<div class="progress progress-md">
<div class="progress-bar bg-warning progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span>
</div>
</div>
<div class="progress progress-md">
<div class="progress-bar bg-danger progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
<span class="sr-only">80% Complete (danger)</span>
</div>
</div>
Sizing
You can also change progress bar size easily by adding one of .progress-sm
.progress-md
.progress-lg
classes to .progress
<p>You can also change progress bar size easily by adding one of <code>.progress-sm</code> <code>.progress-md</code> <code>.progress-lg</code> classes to <code>.progress</code></p>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
<span class="sr-only">40% Complete (success)</span>
</div>
</div>
<div class="progress progress-sm">
<div class="progress-bar" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
<span class="sr-only">20% Complete</span>
</div>
</div>
<div class="progress progress-md">
<div class="progress-bar bg-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
<span class="sr-only">60% Complete (warning)</span>
</div>
</div>
<div class="progress progress-lg">
<div class="progress-bar bg-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
<span class="sr-only">80% Complete (danger)</span>
</div>
</div>