---
layout: default
title: Components
slug: components
lead: "Dozens of reusable components built to provide iconography, dropdowns, navigation, alerts, popovers, and much more."
---
Bootstrap comes with all 160 of Glyphicons Halflings set, all available in font formats for easy coloring, sizing, and placement.
glyphicon-glass
glyphicon-music
glyphicon-search
glyphicon-envelope
glyphicon-heart
glyphicon-star
glyphicon-star-empty
glyphicon-user
glyphicon-film
glyphicon-th-large
glyphicon-th
glyphicon-th-list
glyphicon-ok
glyphicon-remove
glyphicon-zoom-in
glyphicon-zoom-out
glyphicon-off
glyphicon-signal
glyphicon-cog
glyphicon-trash
glyphicon-home
glyphicon-file
glyphicon-time
glyphicon-road
glyphicon-download-alt
glyphicon-download
glyphicon-upload
glyphicon-inbox
glyphicon-play-circle
glyphicon-repeat
glyphicon-refresh
glyphicon-list-alt
glyphicon-lock
glyphicon-flag
glyphicon-headphones
glyphicon-volume-off
glyphicon-volume-down
glyphicon-volume-up
glyphicon-qrcode
glyphicon-barcode
glyphicon-tag
glyphicon-tags
glyphicon-book
glyphicon-bookmark
glyphicon-print
glyphicon-camera
glyphicon-font
glyphicon-bold
glyphicon-italic
glyphicon-text-height
glyphicon-text-width
glyphicon-align-left
glyphicon-align-center
glyphicon-align-right
glyphicon-align-justify
glyphicon-list
glyphicon-indent-left
glyphicon-indent-right
glyphicon-facetime-video
glyphicon-picture
glyphicon-pencil
glyphicon-map-marker
glyphicon-adjust
glyphicon-tint
glyphicon-edit
glyphicon-share
glyphicon-check
glyphicon-move
glyphicon-step-backward
glyphicon-fast-backward
glyphicon-backward
glyphicon-play
glyphicon-pause
glyphicon-stop
glyphicon-forward
glyphicon-fast-forward
glyphicon-step-forward
glyphicon-eject
glyphicon-chevron-left
glyphicon-chevron-right
glyphicon-plus-sign
glyphicon-minus-sign
glyphicon-remove-sign
glyphicon-ok-sign
glyphicon-question-sign
glyphicon-info-sign
glyphicon-screenshot
glyphicon-remove-circle
glyphicon-ok-circle
glyphicon-ban-circle
glyphicon-arrow-left
glyphicon-arrow-right
glyphicon-arrow-up
glyphicon-arrow-down
glyphicon-share-alt
glyphicon-resize-full
glyphicon-resize-small
glyphicon-plus
glyphicon-minus
glyphicon-asterisk
glyphicon-exclamation-sign
glyphicon-gift
glyphicon-leaf
glyphicon-fire
glyphicon-eye-open
glyphicon-eye-close
glyphicon-warning-sign
glyphicon-plane
glyphicon-calendar
glyphicon-random
glyphicon-comment
glyphicon-magnet
glyphicon-chevron-up
glyphicon-chevron-down
glyphicon-retweet
glyphicon-shopping-cart
glyphicon-folder-close
glyphicon-folder-open
glyphicon-resize-vertical
glyphicon-resize-horizontal
glyphicon-hdd
glyphicon-bullhorn
glyphicon-bell
glyphicon-certificate
glyphicon-thumbs-up
glyphicon-thumbs-down
glyphicon-hand-right
glyphicon-hand-left
glyphicon-hand-up
glyphicon-hand-down
glyphicon-circle-arrow-right
glyphicon-circle-arrow-left
glyphicon-circle-arrow-up
glyphicon-circle-arrow-down
glyphicon-globe
glyphicon-wrench
glyphicon-tasks
glyphicon-filter
glyphicon-briefcase
glyphicon-fullscreen
glyphicon-dashboard
glyphicon-paperclip
glyphicon-heart-empty
glyphicon-link
glyphicon-phone
glyphicon-pushpin
glyphicon-euro
glyphicon-usd
glyphicon-gbp
glyphicon-sort
glyphicon-sort-by-alphabet
glyphicon-sort-by-alphabet-alt
glyphicon-sort-by-order
glyphicon-sort-by-order-alt
glyphicon-sort-by-attributes
glyphicon-sort-by-attributes-alt
glyphicon-unchecked
glyphicon-expand
glyphicon-collapse
glyphicon-collapse-top
Glyphicons attribution
Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creator have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.
How to use
Add the appropriate class to any inline element. All icon classes are prefixed with glyphicon- for easy styling. To use, place the following code just about anywhere:
{% highlight html %}
{% endhighlight %}
Want to change the icon color? Just change the color of the parent element.
Readability
When using beside strings of text, as in buttons or nav links, be sure to leave a space after the icon for proper spacing.
Icon examples
Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.
Buttons
Button group in a button toolbar
{% highlight html %}
{% endhighlight %}
Accessibility
Keep in mind that using icons without any additional content means the icons are not represented to screen reader users.
Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add .dropdown-submenu to any li in an existing dropdown menu for automatic styling.
Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.
Basic button group
Wrap a series of buttons with .btn in .btn-group.
{% highlight html %}
{% endhighlight %}
Multiple button groups
Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.
{% highlight html %}
...
...
...
{% endhighlight %}
Nested button groups
Place buttons groups within button groups when you want dropdown menus mixed with a series of buttons.
Navs available in Bootstrap have shared markup, starting with the base .nav class, as well as shared states. Swap modifier classes to switch between each style.
Tabs
Note the .nav-tabs class requires the .nav base class.
To start, navbars are static (not fixed to the top) and include support for a project name and basic navigation. Place one anywhere within a .container, which sets the width of your site and content.
To properly style and position a form within the navbar, add the appropriate classes as shown below. For a default form, include .navbar-form and either .pull-left or .pull-right to properly align it.
{% highlight html %}
{% endhighlight %}
Buttons
For buttons not residing in a <form>, add this class to vertically center buttons within a navbar.
For folks using standard links that are not within the regular navbar navigation component, use the .navbar-link class to add the proper colors for the default and inverse navbar options.
Align nav links, forms, buttons, or text, using the .pull-left or .pull-right utility classes. Both classes will add a CSS float in the specified direction. To align nav links, put them in a separate <ul> with the respective utility class applied.
Optional display variations
Fix the navbar to the top or bottom of the viewport with an additional class on the outermost div, .navbar. These will also remove rounded corners.
The fixed navbar will overlay your other content, unless you add padding to the top of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.
The fixed navbar will overlay your other content, unless you add padding to the bottom of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.
Make sure to include this after the core Bootstrap CSS.
Static top navbar
Create a full-width navbar that scrolls away with the page by adding .navbar-static-top. Unlike the .navbar-fixed-* classes, you do not need to change any padding on the body.
To implement a collapsing responsive navbar, wrap your navbar content in a containing div, .nav-collapse.collapse, and add the navbar toggle button, .navbar-toggle.
Provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.
Standard pagination
Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.
A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small element, as well as most other components (with additional styles).
Example page header Subtext for header
{% highlight html %}
Example page header Subtext for header
{% endhighlight %}
Thumbnails
Extend Bootstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.
Default thumbnails
By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.
{% highlight html %}
...
{% endhighlight %}
Custom content thumbnails
With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.
Thumbnail label
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.
Default alert
Wrap any text and an optional dismiss button in .alert for a basic warning alert message.
Ensure proper behavior across all devices
Be sure to use the <button> element with the data-dismiss="alert" data attribute.
Warning! Best check yo self, you're not looking too good.
{% highlight html %}
Warning! Best check yo self, you're not looking too good.
{% endhighlight %}
Block alerts
For longer messages, increase the padding on the top and bottom of the alert wrapper by adding .alert-block.
Warning!
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.
{% highlight html %}
Warning!
...
{% endhighlight %}
Contextual alternatives
Add optional classes to change an alert's connotation.
Oh snap! Change a few things up and try submitting again.
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
{% highlight html %}
...
...
...
{% endhighlight %}
Links in alerts
Use the .alert-link utility class to quickly provide matching colored links within any alert.
Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.
Cross-browser compatibility
Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.
Basic
Default progress bar with a vertical gradient.
{% highlight html %}
{% endhighlight %}
Contextual alternatives
Progress bars use some of the same button and alert classes for consistent styles.
{% highlight html %}
{% endhighlight %}
Striped
Uses a gradient to create a striped effect. Not available in IE8.
{% highlight html %}
{% endhighlight %}
Animated
Add .active to .progress-striped to animate the stripes right to left. Not available in all versions of IE.
{% highlight html %}
{% endhighlight %}
Stacked
Place multiple bars into the same .progress to stack them.
{% highlight html %}
{% endhighlight %}
Media object
Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.
Default example
The default media allow to float a media object (images, video, audio) to the left or right of a content block.
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
{% highlight html %}
Media heading
...
{% endhighlight %}
Media list
With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
Nested media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
Nested media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
Nested media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
{% highlight html %}
Media heading
...
{% endhighlight %}
List group
List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.
Basic list group
The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
Porta ac consectetur ac
Vestibulum at eros
{% highlight html %}
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
Porta ac consectetur ac
Vestibulum at eros
{% endhighlight %}
With chevrons
Add Glyphicon chevrons that are automatically moved to the right.
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
{% highlight html %}
Cras justo odio
{% endhighlight %}
With badges
Add the badges component to any list group item and it will automatically be positioned on the right.
14
Cras justo odio
2
Dapibus ac facilisis in
1
Morbi leo risus
{% highlight html %}
14
Cras justo odio
{% endhighlight %}
With badges and chevrons
Why not both?
14
Cras justo odio
2
Dapibus ac facilisis in
1
Morbi leo risus
{% highlight html %}
14
Cras justo odio
{% endhighlight %}
Linked list group
Linkify list group items by using anchor tags instead of list items (that also means a parent <div> instead of an <ul>). No need for individual parents around each element.
While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.
Basic panel
By default, all the .panel does is apply some basic border and padding to contain some content.
Basic panel example
{% highlight html %}
Basic panel example
{% endhighlight %}
Panel with heading
Easily add a heading to your panel with .panel-heading. Use it on a <div> or any heading element (e.g., <h3>).
Panel heading
Panel content
{% highlight html %}
Panel heading
Panel content
{% endhighlight %}
Panel with footer
Wrap buttons or secondary text in .panel-footer.
Panel content
{% highlight html %}
Panel content
{% endhighlight %}
Contextual alternatives
Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.
Panel heading
Panel content
Panel heading
Panel content
Panel heading
Panel content
Panel heading
Panel content
Panel heading
Panel content
{% highlight html %}
...
...
...
...
...
{% endhighlight %}
With list groups
Easily include full-width list groups within any panel.
Panel heading
Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
Porta ac consectetur ac
Vestibulum at eros
{% highlight html %}
Panel heading
...
Cras justo odio
Dapibus ac facilisis in
Morbi leo risus
Porta ac consectetur ac
Vestibulum at eros
{% endhighlight %}
Wells
Default well
Use the well as a simple effect on an element to give it an inset effect.
Look, I'm in a well!
{% highlight html %}
...
{% endhighlight %}
Optional classes
Control padding and rounded corners with two optional modifier classes.