Dozens of reusable components are built into Bootstrap to provide navigation, alerts, popovers, and much more.
Ultra simplistic and minimally styled pagination inspired by Rdio. The large block is hard to miss, easily scalable, and provides large click areas.
<div class="pagination"> <ul> <li class="prev disabled"><a href="#">← Previous</a></li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li class="next"><a href="#">Next →</a></li> </ul> </div>
By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.
With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.
Thumbnails (previously .media-grid
up until v1.4) are great for grids of photos or videos, image search results, retail products, portfolios, and much more. They can be links or static content.
Thumbnail markup is simple—a ul
with any number of li
elements is all that is required. It's also super flexible, allowing for any type of content with just a bit more markup to wrap your contents.
Lastly, the thumbnails component uses existing grid system classes—like .span2
or .span3
—for control of thumbnail dimensions.
As mentioned previously, the required markup for thumbnails is light and straightforward. Here's a look at the default setup for linked images:
<ul class="thumbnails"> <li class="span3"> <a href="#" class="thumbnail"> <img src="http://placehold.it/210x150" alt=""> </a> </li> ... </ul>
For custom HTML content in thumbnails, the markup changes slightly. To allow block level content anywhere, we swap the <a>
for a <div>
like so:
<ul class="thumbnails"> <li class="span3"> <div class="thumbnail"> <img src="http://placehold.it/210x150" alt=""> <h5>Thumbnail label</h5> <p>Thumbnail caption right here...</p> </div> </li> ... </ul>
.alert-message
One-line messages for highlighting the failure, possible failure, or success of an action. Particularly useful for forms.
<div class="alert-message warning"> <a class="close">×</a> <p><strong>Holy guacamole!</strong> Best check yo self, you’re not looking too good.</p> </div>
<div class="alert-message block-message">
For messages that require a bit of explanation, we have paragraph style alerts. These are perfect for bubbling up longer error messages, warning a user of a pending action, or just presenting information for more emphasis on the page.
<div class="alert-message block-message warning"> <a class="close">×</a> <p><strong>Holy guacamole! This is a warning!</strong> Best check yo self, you’re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> <div class="alert-actions"> <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> </div> </div>
Default progress bar with a vertical gradient.
<div class="progress"> <div class="bar" style="width: 60%;"></div> </div>
Uses a gradient to create a striped effect.
<div class="progress info striped"> <div class="bar" style="width: 20%;"></div> </div>
Takes the striped example and animates it.
<div class="progress danger striped active"> <div class="bar" style="width: 40%;"></div> </div>
Progress bars utilize some of the same classes as buttons and alert messages for quick styling.
.info
.success
.danger
Alternatively, you can customize the LESS files and roll your own colors and sizes.
Progress bars use CSS3 transitions, so if you dynamically adjust the width via javascript, it will smoothly resize.
If you use the .active
class, your .striped
progress bars will animate the stripes left to right.
Progress bars use CSS3 gradients, transitions, and animations to achieve all theire effects. These features are not supported in IE7-8 or older versions of Firefox.
Opera does not support animations at this time.