Components
Sub menus on dropdowns
Standard pagination
Pager
Labels
Labels | Markup |
---|---|
Default | <span class="label">Default</span> |
Success | <span class="label label-success">Success</span> |
Warning | <span class="label label-warning">Warning</span> |
Important | <span class="label label-important">Important</span> |
Info | <span class="label label-info">Info</span> |
Inverse | <span class="label label-inverse">Inverse</span> |
Badges
Name | Example | Markup |
---|---|---|
Default | 1 | <span class="badge">1</span> |
Success | 2 | <span class="badge badge-success">2</span> |
Warning | 4 | <span class="badge badge-warning">4</span> |
Important | 6 | <span class="badge badge-important">6</span> |
Info | 8 | <span class="badge badge-info">8</span> |
Inverse | 10 | <span class="badge badge-inverse">10</span> |
Hero unit
Hello, world!
This is a simple hero unit, a simple headertop-style component for calling extra attention to featured content or information.
Page header + breadcrums
Example page header Subtext for header
Default alert
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.
Error or danger
Success
Information
Progress bars For loading, redirecting, or action status
Basic
Striped
Animated
Stacked
Modals
Modal header
One fine body…
Live demo
Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.
Tooltips
Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.
Four directions
Popovers
Static popover
Popover top
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Popover right
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Popover bottom
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Popover left
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
No markup shown as popovers are generated from JavaScript and content within a data
attribute.
Live demo
Collapse
Icons Graciously provided by Glyphicons
Built as a sprite
Instead of making every icon an extra request, we've compiled them into a sprite - a bunch of images in one file that uses CSS to position the images with background-position
. This is the same method we use on Twitter.com and it has worked well for us.
All icons classes are prefixed with .icon-
for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.
Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.
How to use
Bootstrap uses an <i>
tag for all icons, but they have no case class - only a shared prefix. To use, place the following code just about anywhere:
- <i class="icon-search"></i>
There are also styles available for inverted (white) icons, made ready with one extra class:
- <i class="icon-search icon-white"></i>
There are 120 classes to choose from for your icons. Just add an <i>
tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.
Heads up!
When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i>
tag for proper spacing.
Use cases
Icons are great, but where would one use them? Here are a few ideas:
- As visuals for your sidebar navigation
- For a purely icon-driven navigation
- For buttons to help convey the meaning of an action
- With links to share context on a user's destination
Essentially, anywhere you can put an <i>
tag, you can put an icon.
Icons by Font Awesome Graciously provided by Font-Awesome
Font awesome icons have similar classes names with default Bootsrap icons. To prevent conflict, we added prefix "fa". Thus, you can use both sets of icons.
Important! Font awesome icons have prefix "fa" before each icon, e.g. "fa-icon-home" <i class="fa-icon-home"></i>
You can finde all docs in folder docs/FA_ICONS
One font, 249 fa-icons
In a single collection, Font Awesome is a pictographic language of web-related actions.CSS control
Easily style fa-icon color, size, shadow, and anything that's possible with CSS.Infinite scalability
Scalable vector graphics means every fa-icon looks awesome at any size.Free, as in Beer
Font Awesome is completely free for commercial use. Check out the license.IE7 Support
Font Awesome supports IE7. If you need it, you have my condolences.Perfect on Retina Displays
Font Awesome fa-icons are vectors, which mean they're gorgeous on high-resolution displays.Made for Twitter Bootstrap
Designed from scratch to be fully compatible with Twitter Bootstrap 2.2.2.Designer Friendly
Install FontAwesome.otf and visit the copy & paste page. Happy designing.Screen reader compatible
Font Awesome won't trip up screen readers, unlike other fa-icon fonts.What's new in Font Awesome 3.0
Pixel Perfection at 14px
Every single icon re-created from the ground up to be optimized for Bootstrap's default 14px.Font Sub-setting
Thanks to @grantgordon and @johnsmclay, you can subset to get just the icons you need.Better License
SIL open font license, MIT license for code. No more attribution required, but much appreciated.40 New Icons in 3.0
Requested by the active community on the Font Awesome GitHub project.New Styles
New styles for animated spinning icons, icons with 2x-4x size multipliers, icon borders, & more.28% Smaller Payload
3.0 is smaller, even with 16% more icons. Crazy small if you subset just the icons you need.New Icons in 3.0
You asked, Font Awesome delivers with 40 shiny new icons in version 3.0. New icons can be requested on the Font Awesome GitHub project. Or even better, you can contribute your own icons.