You are on page 1of 39

4/3/2016

ComponentsBootstrap
Aww yeah, Bootstrap 4 is coming! (http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/)

Components
Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation,
alerts, and much more.

Glyphicons
Available glyphs
Includes over 250 glyphs in font format from the Glyphicon Halings set. Glyphicons (http://glyphicons.com/) Halings are normally not available for
free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you include a link back to Glyphicons
(http://glyphicons.com/) whenever possible.

glyphicon glyphicon-asterisk

glyphicon glyphicon-plus

glyphicon glyphicon-euro

glyphicon glyphicon-eur

glyphicon glyphicon-minus

glyphicon glyphicon-cloud

glyphicon glyphicon-envelope

glyphicon glyphicon-pencil

glyphicon glyphicon-glass

glyphicon glyphicon-music

glyphicon glyphicon-search

glyphicon glyphicon-heart

glyphicon glyphicon-star

glyphicon glyphicon-star-empty

glyphicon glyphicon-user

glyphicon glyphicon-lm

glyphicon glyphicon-th-large

glyphicon glyphicon-th

glyphicon glyphicon-th-list

glyphicon glyphicon-ok

glyphicon glyphicon-remove

glyphicon glyphicon-zoom-in

glyphicon glyphicon-zoom-out

glyphicon glyphicon-off

glyphicon glyphicon-signal

glyphicon glyphicon-cog

glyphicon glyphicon-trash

glyphicon glyphicon-home

glyphicon glyphicon-le

glyphicon glyphicon-time

glyphicon glyphicon-road

glyphicon glyphicon-download-alt

glyphicon glyphicon-download

glyphicon glyphicon-upload

glyphicon glyphicon-inbox

glyphicon glyphicon-play-circle

glyphicon glyphicon-repeat

glyphicon glyphicon-refresh

glyphicon glyphicon-list-alt

glyphicon glyphicon-lock

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

1/39

4/3/2016

ComponentsBootstrap

glyphicon glyphicon-ag

glyphicon glyphicon-headphones

glyphicon glyphicon-volume-off

glyphicon glyphicon-volume-down

glyphicon glyphicon-volume-up

glyphicon glyphicon-qrcode

glyphicon glyphicon-barcode

glyphicon glyphicon-tag

glyphicon glyphicon-tags

glyphicon glyphicon-book

glyphicon glyphicon-bookmark

glyphicon glyphicon-print

glyphicon glyphicon-camera

glyphicon glyphicon-font

glyphicon glyphicon-bold

glyphicon glyphicon-italic

glyphicon glyphicon-text-height

glyphicon glyphicon-text-width

glyphicon glyphicon-align-left

glyphicon glyphicon-align-center

glyphicon glyphicon-align-right

glyphicon glyphicon-align-justify

glyphicon glyphicon-list

glyphicon glyphicon-indent-left

glyphicon glyphicon-indent-right

glyphicon glyphicon-facetime-video

glyphicon glyphicon-picture

glyphicon glyphicon-map-marker

glyphicon glyphicon-adjust

glyphicon glyphicon-tint

glyphicon glyphicon-edit

glyphicon glyphicon-share

glyphicon glyphicon-check

glyphicon glyphicon-move

glyphicon glyphicon-step-backward

glyphicon glyphicon-fast-backward

glyphicon glyphicon-backward

glyphicon glyphicon-play

glyphicon glyphicon-pause

glyphicon glyphicon-stop

glyphicon glyphicon-forward

glyphicon glyphicon-fast-forward

glyphicon glyphicon-step-forward

glyphicon glyphicon-eject

glyphicon glyphicon-chevron-left

glyphicon glyphicon-chevron-right

glyphicon glyphicon-plus-sign

glyphicon glyphicon-minus-sign

glyphicon glyphicon-remove-sign

glyphicon glyphicon-ok-sign

glyphicon glyphicon-question-sign

glyphicon glyphicon-info-sign

glyphicon glyphicon-screenshot

glyphicon glyphicon-remove-circle

glyphicon glyphicon-ok-circle

glyphicon glyphicon-ban-circle

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

2/39

4/3/2016

ComponentsBootstrap

glyphicon glyphicon-arrow-left

glyphicon glyphicon-arrow-right

glyphicon glyphicon-arrow-up

glyphicon glyphicon-arrow-down

glyphicon glyphicon-share-alt

glyphicon glyphicon-resize-full

glyphicon glyphicon-resize-small

glyphicon glyphicon-exclamation-sign

glyphicon glyphicon-gift

glyphicon glyphicon-leaf

glyphicon glyphicon-re

glyphicon glyphicon-eye-open

glyphicon glyphicon-eye-close

glyphicon glyphicon-warning-sign

glyphicon glyphicon-plane

glyphicon glyphicon-calendar

glyphicon glyphicon-random

glyphicon glyphicon-comment

glyphicon glyphicon-magnet

glyphicon glyphicon-chevron-up

glyphicon glyphicon-chevron-down

glyphicon glyphicon-retweet

glyphicon glyphicon-shopping-cart

glyphicon glyphicon-folder-close

glyphicon glyphicon-folder-open

glyphicon glyphicon-resize-vertical

glyphicon glyphicon-resize-horizontal

glyphicon glyphicon-hdd

glyphicon glyphicon-bullhorn

glyphicon glyphicon-bell

glyphicon glyphicon-certicate

glyphicon glyphicon-thumbs-up

glyphicon glyphicon-thumbs-down

glyphicon glyphicon-hand-right

glyphicon glyphicon-hand-left

glyphicon glyphicon-hand-up

glyphicon glyphicon-hand-down

glyphicon glyphicon-circle-arrow-right

glyphicon glyphicon-circle-arrow-left

glyphicon glyphicon-circle-arrow-up

glyphicon glyphicon-circle-arrow-down

glyphicon glyphicon-globe

glyphicon glyphicon-wrench

glyphicon glyphicon-tasks

glyphicon glyphicon-lter

glyphicon glyphicon-briefcase

glyphicon glyphicon-fullscreen

glyphicon glyphicon-dashboard

glyphicon glyphicon-paperclip

glyphicon glyphicon-heart-empty

glyphicon glyphicon-link

glyphicon glyphicon-phone

glyphicon glyphicon-pushpin

glyphicon glyphicon-usd

glyphicon glyphicon-gbp

glyphicon glyphicon-sort

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

3/39

4/3/2016

ComponentsBootstrap

glyphicon glyphicon-sort-by-alphabet

glyphicon glyphicon-sort-by-alphabet-alt

glyphicon glyphicon-sort-by-order

glyphicon glyphicon-sort-by-order-alt

glyphicon glyphicon-sort-by-attributes

glyphicon glyphicon-sort-by-attributes-alt

glyphicon glyphicon-unchecked

glyphicon glyphicon-expand

glyphicon glyphicon-collapse-down

glyphicon glyphicon-collapse-up

glyphicon glyphicon-log-in

glyphicon glyphicon-ash

glyphicon glyphicon-log-out

glyphicon glyphicon-new-window

glyphicon glyphicon-record

glyphicon glyphicon-save

glyphicon glyphicon-open

glyphicon glyphicon-saved

glyphicon glyphicon-import

glyphicon glyphicon-export

glyphicon glyphicon-send

glyphicon glyphicon-oppy-disk

glyphicon glyphicon-oppy-saved

glyphicon glyphicon-oppy-remove

glyphicon glyphicon-oppy-save

glyphicon glyphicon-oppy-open

glyphicon glyphicon-credit-card

glyphicon glyphicon-transfer

glyphicon glyphicon-cutlery

glyphicon glyphicon-header

glyphicon glyphicon-compressed

glyphicon glyphicon-earphone

glyphicon glyphicon-phone-alt

glyphicon glyphicon-tower

glyphicon glyphicon-stats

glyphicon glyphicon-sd-video

glyphicon glyphicon-hd-video

glyphicon glyphicon-subtitles

glyphicon glyphicon-sound-stereo

glyphicon glyphicon-sound-dolby

glyphicon glyphicon-sound-5-1

glyphicon glyphicon-sound-6-1

glyphicon glyphicon-sound-7-1

glyphicon glyphicon-copyright-mark

glyphicon glyphicon-registration-mark

glyphicon glyphicon-cloud-download

glyphicon glyphicon-cloud-upload

glyphicon glyphicon-tree-conifer

glyphicon glyphicon-tree-deciduous

glyphicon glyphicon-cd

glyphicon glyphicon-save-le

glyphicon glyphicon-open-le

glyphicon glyphicon-level-up

glyphicon glyphicon-copy

glyphicon glyphicon-paste

glyphicon glyphicon-alert

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

4/39

4/3/2016

ComponentsBootstrap

glyphicon glyphicon-equalizer

glyphicon glyphicon-king

glyphicon glyphicon-queen

glyphicon glyphicon-pawn

glyphicon glyphicon-bishop

glyphicon glyphicon-knight

glyphicon glyphicon-baby-formula

glyphicon glyphicon-tent

glyphicon glyphicon-blackboard

glyphicon glyphicon-bed

glyphicon glyphicon-apple

glyphicon glyphicon-erase

glyphicon glyphicon-hourglass

glyphicon glyphicon-lamp

glyphicon glyphicon-duplicate

glyphicon glyphicon-piggy-bank

glyphicon glyphicon-scissors

glyphicon glyphicon-bitcoin

glyphicon glyphicon-btc

glyphicon glyphicon-xbt

glyphicon glyphicon-yen

glyphicon glyphicon-jpy

glyphicon glyphicon-ruble

glyphicon glyphicon-rub

glyphicon glyphicon-scale

glyphicon glyphicon-ice-lolly

glyphicon glyphicon-ice-lolly-tasted

glyphicon glyphicon-education

glyphicon glyphicon-option-horizontal

glyphicon glyphicon-option-vertical

glyphicon glyphicon-menu-hamburger

glyphicon glyphicon-modal-window

glyphicon glyphicon-oil

glyphicon glyphicon-grain

glyphicon glyphicon-sunglasses

glyphicon glyphicon-text-size

glyphicon glyphicon-text-color

glyphicon glyphicon-text-background

glyphicon glyphicon-object-align-top

glyphicon glyphicon-object-align-bottom

glyphicon glyphicon-object-align-horizontal

glyphicon glyphicon-object-align-left

glyphicon glyphicon-object-align-vertical

glyphicon glyphicon-object-align-right

glyphicon glyphicon-triangle-right

glyphicon glyphicon-triangle-left

glyphicon glyphicon-triangle-bottom

glyphicon glyphicon-triangle-top

glyphicon glyphicon-console

glyphicon glyphicon-superscript

glyphicon glyphicon-subscript

glyphicon glyphicon-menu-left

glyphicon glyphicon-menu-right

glyphicon glyphicon-menu-down

glyphicon glyphicon-menu-up

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

How to use

5/39

4/3/2016

ComponentsBootstrap

How to use
For performance reasons, all icons require a base class and individual icon class. To use, place the following code just about anywhere. Be sure to
leave a space between the icon and text for proper padding.

Don't mix with other components


Icon classes cannot be directly combined with other components. They should not be used along with other classes on the same element.
Instead, add a nested

<span>

and apply the icon classes to the

<span>

Only for use on empty elements


Icon classes should only be used on elements that contain no text content and have no child elements.

Changing the icon font location


Bootstrap assumes icon font
font

les

les

will be located in the

../fonts/

directory, relative to the compiled CSS

les.

Moving or renaming those

means updating the CSS in one of three ways:

Change the

@iconfontpath

and/or

@iconfontname

variables in the source Less

les.

Utilize the relative URLs option (http://lesscss.org/usage/#command-line-usage-relative-urls) provided by the Less compiler.
Change the

url()

paths in the compiled CSS.

Use whatever option best suits your specic development setup.

Accessible icons
Modern versions of assistive technologies will announce CSS generated content, as well as specic Unicode characters. To avoid
unintended and confusing output in screen readers (particularly when icons are used purely for decoration), we hide them with the

hidden="true"

aria

attribute.

If you're using an icon to convey meaning (rather than only as a decorative element), ensure that this meaning is also conveyed to assistive
technologies

for instance, include additional content, visually hidden with the

If you're creating controls with no other text (such as a

<button>

.sronly

class.

that only contains an icon), you should always provide alternative content

to identify the purpose of the control, so that it will make sense to users of assistive technologies. In this case, you could add an

label

aria

attribute on the control itself.

<spanclass="glyphiconglyphiconsearch"ariahidden="true"></span>

Examples
Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

EXAMPLE

Star

Star

Star

Star

<buttontype="button"class="btnbtndefault"arialabel="LeftAlign">
<spanclass="glyphiconglyphiconalignleft"ariahidden="true"></span>
</button>
<buttontype="button"class="btnbtndefaultbtnlg">
<spanclass="glyphiconglyphiconstar"ariahidden="true"></span>Star
</button>

An icon used in an alert to convey that it's an error message, with additional

.sronly

text to convey this hint to users of assistive technologies.

EXAMPLE

Enter a valid email address

<divclass="alertalertdanger"role="alert">
<spanclass="glyphiconglyphiconexclamationsign"ariahidden="true"></span>
<spanclass="sronly">Error:</span>
Enteravalidemailaddress
</div>

Dropdowns
http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

6/39

4/3/2016

ComponentsBootstrap

Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin
(../javascript/#dropdowns).

Example
Wrap the dropdown's trigger and the dropdown menu within

.dropdown

, or another element that declares

position:relative;

. Then add the

menu's HTML.

EXAMPLE

Dropdown

Action
Another action
Something else here

<divclass="dropdown">
<buttonclass="btnbtndefaultdropdowntoggle"type="button"id="dropdownMenu1"datatoggle="dropdown"aria
haspopup="true"ariaexpanded="true">
Dropdown
<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu"arialabelledby="dropdownMenu1">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</div>

Dropdown menus can be changed to expand upwards (instead of downwards) by adding

.dropup

to the parent.

EXAMPLE

Dropup

<divclass="dropup">
<buttonclass="btnbtndefaultdropdowntoggle"type="button"id="dropdownMenu2"datatoggle="dropdown"aria
haspopup="true"ariaexpanded="false">
Dropup
<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu"arialabelledby="dropdownMenu2">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</div>

Alignment
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add

.dropdownmenu

.dropdownmenuright

to a

to right align the dropdown menu.

May require additional positioning


Dropdowns are automatically positioned via CSS within the normal
parents with certain

Deprecated

overflow

.pullright

As of v3.1.0, we've deprecated

ow

of the document. This means dropdowns may be cropped by

properties or appear out of bounds of the viewport. Address these issues on your own as they arise.

alignment

.pullright

on dropdown menus. To right-align a menu, use

.dropdownmenuright

components in the navbar use a mixin version of this class to automatically align the menu. To override it, use

. Right-aligned nav

.dropdownmenuleft

<ulclass="dropdownmenudropdownmenuright"arialabelledby="dLabel">
...
</ul>

Headers
Add a header to label sections of actions in any dropdown menu.

EXAMPLE

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

7/39

4/3/2016

ComponentsBootstrap

Dropdown

Dropdown header

Action
Another action
Something else here
Dropdown header

Separated link

<ulclass="dropdownmenu"arialabelledby="dropdownMenu3">
...
<liclass="dropdownheader">Dropdownheader</li>
...
</ul>

Divider
Add a divider to separate series of links in a dropdown menu.

EXAMPLE

Dropdown

Action
Another action
Something else here

Separated link

<ulclass="dropdownmenu"arialabelledby="dropdownMenuDivider">
...
<lirole="separator"class="divider"></li>
...
</ul>

Disabled menu items


Add

.disabled

to a

<li>

in the dropdown to disable the link.

EXAMPLE

Dropdown

Regular link
Disabled link
Another link

<ulclass="dropdownmenu"arialabelledby="dropdownMenu4">
<li><ahref="#">Regularlink</a></li>
<liclass="disabled"><ahref="#">Disabledlink</a></li>
<li><ahref="#">Anotherlink</a></li>
</ul>

Button groups
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 (../javascript/#buttons).

Tooltips & popovers in button groups require special setting


When using tooltips or popovers on elements within a

.btngroup

, you'll have to specify the option

container:'body'

to avoid unwanted

side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).

Ensure correct

role

and provide a label

In order for assistive technologies

such as screen readers

needs to be provided. For button groups, this would be

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

to convey that a series of buttons is grouped, an appropriate

role="group"

, while toolbars should have a

role="toolbar"

role

attribute

8/39

4/3/2016

ComponentsBootstrap

One exception are groups which only contain a single control (for instance the justied button groups with

<button>

elements) or a

dropdown.

In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite
the presence of the correct

role

attribute. In the examples provided here, we use

arialabel

, but alternatives such as

arialabelledby

can also be used.

Basic example
Wrap a series of buttons with

.btn

in

.btngroup

EXAMPLE

Left

Middle

Right

<divclass="btngroup"role="group"arialabel="...">
<buttontype="button"class="btnbtndefault">Left</button>
<buttontype="button"class="btnbtndefault">Middle</button>
<buttontype="button"class="btnbtndefault">Right</button>
</div>

Button toolbar
Combine sets of

<divclass="btngroup">

into a

<divclass="btntoolbar">

for more complex components.

EXAMPLE

<divclass="btntoolbar"role="toolbar"arialabel="...">
<divclass="btngroup"role="group"arialabel="...">...</div>
<divclass="btngroup"role="group"arialabel="...">...</div>
<divclass="btngroup"role="group"arialabel="...">...</div>
</div>

Sizing
Instead of applying button sizing classes to every button in a group, just add

.btngroup*

to each

.btngroup

, including when nesting multiple

groups.

EXAMPLE

Left

Middle

Left

Middle

Left

Left

Middle

Middle

Right

Right

Right

Right

<divclass="btngroupbtngrouplg"role="group"arialabel="...">...</div>
<divclass="btngroup"role="group"arialabel="...">...</div>
<divclass="btngroupbtngroupsm"role="group"arialabel="...">...</div>
<divclass="btngroupbtngroupxs"role="group"arialabel="...">...</div>

Nesting
Place a

.btngroup

within another

.btngroup

when you want dropdown menus mixed with a series of buttons.

EXAMPLE

Dropdown

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

9/39

4/3/2016

ComponentsBootstrap

<divclass="btngroup"role="group"arialabel="...">
<buttontype="button"class="btnbtndefault">1</button>
<buttontype="button"class="btnbtndefault">2</button>
<divclass="btngroup"role="group">
<buttontype="button"class="btnbtndefaultdropdowntoggle"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
Dropdown
<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu">
<li><ahref="#">Dropdownlink</a></li>
<li><ahref="#">Dropdownlink</a></li>
</ul>
</div>
</div>

Vertical variation
Make a set of buttons appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.

EXAMPLE

Button

Button

Dropdown

Button

Button

Dropdown

Dropdown

Dropdown

<divclass="btngroupvertical"role="group"arialabel="...">
...
</div>

ed button groups

Justi

Make a group of buttons stretch at equal sizes to span the entire width of its parent. Also works with button dropdowns within the button group.

Handling borders
Due to the specic HTML and CSS used to justify buttons (namely

marginleft:1px

regular button groups,

display:tablecell

display:tablecell

), the borders between them are doubled. In

is used to stack the borders instead of removing them. However,

margin

doesn't work with

. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.

IE8 and borders


Internet Explorer 8 doesn't render borders on buttons in a justied button group, whether it's on
that, wrap each button in another

.btngroup

<a>

or

<button>

elements. To get around

See #12476 (https://github.com/twbs/bootstrap/issues/12476) for more information.

With

<a>

elements

Just wrap a series of

.btn

s in

.btngroup.btngroupjustified

EXAMPLE

Left

Middle

Left

Middle

Right

Dropdown

<divclass="btngroupbtngroupjustified"role="group"arialabel="...">
...
</div>

Links acting as buttons


If the

<a>

elements are used to act as buttons

within the current page

triggering in-page functionality, rather than navigating to another document or section

they should also be given an appropriate

With <button> elements


http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

role="button"

10/39

4/3/2016
With

ComponentsBootstrap

<button>

elements

To use justied button groups with

<button>

CSS for justication to

<button>

elements, you must wrap each button in a button group. Most browsers don't properly apply our

elements, but since we support button dropdowns, we can work around that.

EXAMPLE

Left

Middle

Right

<divclass="btngroupbtngroupjustified"role="group"arialabel="...">
<divclass="btngroup"role="group">
<buttontype="button"class="btnbtndefault">Left</button>
</div>
<divclass="btngroup"role="group">
<buttontype="button"class="btnbtndefault">Middle</button>
</div>
<divclass="btngroup"role="group">
<buttontype="button"class="btnbtndefault">Right</button>
</div>
</div>

Button dropdowns
Use any button to trigger a dropdown menu by placing it within a

.btngroup

and providing the proper menu markup.

Plugin dependency
Button dropdowns require the dropdown plugin (../javascript/#dropdowns) to be included in your version of Bootstrap.

Single button dropdowns


Turn a button into a dropdown toggle with some basic markup changes.

EXAMPLE

Default

Primary

Success

Info

Warning

Danger

<!Singlebutton>
<divclass="btngroup">
<buttontype="button"class="btnbtndefaultdropdowntoggle"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
Action<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</div>

Split button dropdowns


Similarly, create split button dropdowns with the same markup changes, only with a separate button.

EXAMPLE

Default

Primary

Success

Info

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

Warning

Danger

11/39

4/3/2016

ComponentsBootstrap

<!Splitbutton>
<divclass="btngroup">
<buttontype="button"class="btnbtndanger">Action</button>
<buttontype="button"class="btnbtndangerdropdowntoggle"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
<spanclass="caret"></span>
<spanclass="sronly">ToggleDropdown</span>
</button>
<ulclass="dropdownmenu">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</div>

Sizing
Button dropdowns work with buttons of all sizes.

EXAMPLE

Large button

Small button

Extra small button

<!Largebuttongroup>
<divclass="btngroup">
<buttonclass="btnbtndefaultbtnlgdropdowntoggle"type="button"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
Largebutton<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu">
...
</ul>
</div>
<!Smallbuttongroup>
<divclass="btngroup">
<buttonclass="btnbtndefaultbtnsmdropdowntoggle"type="button"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
Smallbutton<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu">
...
</ul>
</div>
<!Extrasmallbuttongroup>
<divclass="btngroup">
<buttonclass="btnbtndefaultbtnxsdropdowntoggle"type="button"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
Extrasmallbutton<spanclass="caret"></span>
</button>
<ulclass="dropdownmenu">
...
</ul>
</div>

Dropup variation
Trigger dropdown menus above elements by adding

.dropup

to the parent.

EXAMPLE

Dropup

Right dropup

<divclass="btngroupdropup">
<buttontype="button"class="btnbtndefault">Dropup</button>
<buttontype="button"class="btnbtndefaultdropdowntoggle"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">
<spanclass="caret"></span>
<spanclass="sronly">ToggleDropdown</span>
</button>
<ulclass="dropdownmenu">
<!Dropdownmenulinks>
</ul>
</div>

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

12/39

4/3/2016

ComponentsBootstrap

Input groups
Extend form controls by adding text or buttons before, after, or on both sides of any text-based

.inputgroupaddon

Textual

.inputgroupbtn

or

<input> s

to prepend or append elements to a single

<input> .

Use

.inputgroup

with an

.formcontrol .

only

Avoid using

<select>

Avoid using

<textarea>

elements here as they cannot be fully styled in WebKit browsers.

elements here as their

rows

attribute will not be respected in some cases.

Tooltips & popovers in input groups require special setting


When using tooltips or popovers on elements within an

.inputgroup

, you'll have to specify the option

container:'body'

to avoid

unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).

Don't mix with other components


Do not mix form groups or grid column classes directly with input groups. Instead, nest the input group inside of the form group or gridrelated element.

Always add labels


Screen readers will have trouble with your forms if you don't include a label for every input. For these input groups, ensure that any
additional label or functionality is conveyed to assistive technologies.

The exact technique to be used (visible

arialabelledby

ariadescribedby

<label>
title

or

elements,

<label>

placeholder

elements hidden using the

.sronly

class, or use of the

arialabel

attribute) and what additional information will need to be conveyed will vary

depending on the exact type of interface widget you're implementing. The examples in this section provide a few suggested, case-specic
approaches.

Basic example
Place one add-on or button on either side of an input. You may also place one on both sides of an input.

We do not support multiple add-ons (

.inputgroupaddon

or

.inputgroupbtn

) on a single side.

We do not support multiple form-controls in a single input group.

EXAMPLE

Username

Recipient's username

@example.com

.00

Your vanity URL

https://example.com/users/

<divclass="inputgroup">
<spanclass="inputgroupaddon"id="basicaddon1">@</span>
<inputtype="text"class="formcontrol"placeholder="Username"ariadescribedby="basicaddon1">
</div>
<divclass="inputgroup">
<inputtype="text"class="formcontrol"placeholder="Recipient'susername"ariadescribedby="basicaddon2">
<spanclass="inputgroupaddon"id="basicaddon2">@example.com</span>
</div>
<divclass="inputgroup">
<spanclass="inputgroupaddon">$</span>
<inputtype="text"class="formcontrol"arialabel="Amount(tothenearestdollar)">
<spanclass="inputgroupaddon">.00</span>
</div>
<labelfor="basicurl">YourvanityURL</label>
<divclass="inputgroup">
<spanclass="inputgroupaddon"id="basicaddon3">https://example.com/users/</span>
<inputtype="text"class="formcontrol"id="basicurl"ariadescribedby="basicaddon3">
</div>

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

Sizing

13/39

4/3/2016

ComponentsBootstrap

Sizing
Add the relative form sizing classes to the

.inputgroup

itself and contents within will automatically resize

no need for repeating the form control

size classes on each element.

EXAMPLE

Username

Username

Username

<divclass="inputgroupinputgrouplg">
<spanclass="inputgroupaddon"id="sizingaddon1">@</span>
<inputtype="text"class="formcontrol"placeholder="Username"ariadescribedby="sizingaddon1">
</div>
<divclass="inputgroup">
<spanclass="inputgroupaddon"id="sizingaddon2">@</span>
<inputtype="text"class="formcontrol"placeholder="Username"ariadescribedby="sizingaddon2">
</div>
<divclass="inputgroupinputgroupsm">
<spanclass="inputgroupaddon"id="sizingaddon3">@</span>
<inputtype="text"class="formcontrol"placeholder="Username"ariadescribedby="sizingaddon3">
</div>

Checkboxes and radio addons


Place any checkbox or radio option within an input group's addon instead of text.

EXAMPLE

<divclass="row">
<divclass="collg6">
<divclass="inputgroup">
<spanclass="inputgroupaddon">
<inputtype="checkbox"arialabel="...">
</span>
<inputtype="text"class="formcontrol"arialabel="...">
</div><!/inputgroup>
</div><!/.collg6>
<divclass="collg6">
<divclass="inputgroup">
<spanclass="inputgroupaddon">
<inputtype="radio"arialabel="...">
</span>
<inputtype="text"class="formcontrol"arialabel="...">
</div><!/inputgroup>
</div><!/.collg6>
</div><!/.row>

Button addons
Buttons in input groups are a bit different and require one extra level of nesting. Instead of

btn

.inputgroupaddon

, you'll need to use

.inputgroup

to wrap the buttons. This is required due to default browser styles that cannot be overridden.

EXAMPLE

Go!

Search for...

Search for...

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

Go!

14/39

4/3/2016

ComponentsBootstrap

<divclass="row">
<divclass="collg6">
<divclass="inputgroup">
<spanclass="inputgroupbtn">
<buttonclass="btnbtndefault"type="button">Go!</button>
</span>
<inputtype="text"class="formcontrol"placeholder="Searchfor...">
</div><!/inputgroup>
</div><!/.collg6>
<divclass="collg6">
<divclass="inputgroup">
<inputtype="text"class="formcontrol"placeholder="Searchfor...">
<spanclass="inputgroupbtn">
<buttonclass="btnbtndefault"type="button">Go!</button>
</span>
</div><!/inputgroup>
</div><!/.collg6>
</div><!/.row>

Buttons with dropdowns


EXAMPLE

Action

Action

<divclass="row">
<divclass="collg6">
<divclass="inputgroup">
<divclass="inputgroupbtn">
<buttontype="button"class="btnbtndefaultdropdowntoggle"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">Action<spanclass="caret"></span></button>
<ulclass="dropdownmenu">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</div><!/btngroup>
<inputtype="text"class="formcontrol"arialabel="...">
</div><!/inputgroup>
</div><!/.collg6>
<divclass="collg6">
<divclass="inputgroup">
<inputtype="text"class="formcontrol"arialabel="...">
<divclass="inputgroupbtn">
<buttontype="button"class="btnbtndefaultdropdowntoggle"datatoggle="dropdown"ariahaspopup="true"aria
expanded="false">Action<spanclass="caret"></span></button>
<ulclass="dropdownmenudropdownmenuright">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</div><!/btngroup>
</div><!/inputgroup>
</div><!/.collg6>
</div><!/.row>

Segmented buttons
EXAMPLE

Action

Action

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

15/39

4/3/2016

ComponentsBootstrap

<divclass="inputgroup">
<divclass="inputgroupbtn">
<!Buttonanddropdownmenu>
</div>
<inputtype="text"class="formcontrol"arialabel="...">
</div>
<divclass="inputgroup">
<inputtype="text"class="formcontrol"arialabel="...">
<divclass="inputgroupbtn">
<!Buttonanddropdownmenu>
</div>
</div>

Multiple buttons
While you can only have one add-on per side, you can have multiple buttons inside a single

.inputgroupbtn

EXAMPLE

Action

<divclass="inputgroup">
<divclass="inputgroupbtn">
<!Buttons>
</div>
<inputtype="text"class="formcontrol"arialabel="...">
</div>
<divclass="inputgroup">
<inputtype="text"class="formcontrol"arialabel="...">
<divclass="inputgroupbtn">
<!Buttons>
</div>
</div>

Navs
Navs available in Bootstrap have shared markup, starting with the base

.nav

class, as well as shared states. Swap modier classes

to switch between each style.

Using navs for tab panels requires JavaScript tabs plugin


For tabs with tabbable areas, you must use the tabs JavaScript plugin (../javascript/#tabs). The markup will also require additional
ARIA attributes

role

and

see the plugin's example markup (../javascript/#tabs-usage) for further details.

Make navs used as navigation accessible


If you are using navs to provide a navigation bar, be sure to add a
wrap a

<nav>

role="navigation"

element around the whole navigation. Do not add the role to the

<ul>

to the most logical parent container of the

<ul>

, or

itself, as this would prevent it from being announced

as an actual list by assistive technologies.

Tabs
Note the

.navtabs

class requires the

.nav

base class.

EXAMPLE

Home

Prole

Messages

<ulclass="navnavtabs">
<lirole="presentation"class="active"><ahref="#">Home</a></li>
<lirole="presentation"><ahref="#">Profile</a></li>
<lirole="presentation"><ahref="#">Messages</a></li>
</ul>

Pills
Take that same HTML, but use

.navpills

instead:

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

16/39

4/3/2016

ComponentsBootstrap

EXAMPLE

Home

Prole

Messages

<ulclass="navnavpills">
<lirole="presentation"class="active"><ahref="#">Home</a></li>
<lirole="presentation"><ahref="#">Profile</a></li>
<lirole="presentation"><ahref="#">Messages</a></li>
</ul>

Pills are also vertically stackable. Just add

.navstacked

EXAMPLE

Home

Prole

Messages

<ulclass="navnavpillsnavstacked">
...
</ul>

ed

Justi

Easily make tabs or pills equal widths of their parent at screens wider than 768px with

.navjustified

. On smaller screens, the nav links are

stacked.

Justied navbar nav links are currently not supported.

Safari and responsive justi

ed navs

As of v8.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justied nav that are cleared upon
refreshing. This bug is also shown in the justied nav example (../examples/justied-nav/).

EXAMPLE

Home

Prole

Messages

Home

Prole

Messages

<ulclass="navnavtabsnavjustified">
...
</ul>
<ulclass="navnavpillsnavjustified">
...
</ul>

Disabled links
For any nav component (tabs or pills), add

.disabled

for gray links and no hover effects.

Link functionality not impacted


This class will only change the

<a>

's appearance, not its functionality. Use custom JavaScript to disable links here.

EXAMPLE

Clickable link

Clickable link

Disabled link

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

17/39

4/3/2016

ComponentsBootstrap

<ulclass="navnavpills">
...
<lirole="presentation"class="disabled"><ahref="#">Disabledlink</a></li>
...
</ul>

Using dropdowns
Add dropdown menus with a little extra HTML and the dropdowns JavaScript plugin (../javascript/#dropdowns).

Tabs with dropdowns


EXAMPLE

Home

Help

Dropdown

<ulclass="navnavtabs">
...
<lirole="presentation"class="dropdown">
<aclass="dropdowntoggle"datatoggle="dropdown"href="#"role="button"ariahaspopup="true"ariaexpanded="false">
Dropdown<spanclass="caret"></span>
</a>
<ulclass="dropdownmenu">
...
</ul>
</li>
...
</ul>

Pills with dropdowns


EXAMPLE

Home

Help

Dropdown

<ulclass="navnavpills">
...
<lirole="presentation"class="dropdown">
<aclass="dropdowntoggle"datatoggle="dropdown"href="#"role="button"ariahaspopup="true"ariaexpanded="false">
Dropdown<spanclass="caret"></span>
</a>
<ulclass="dropdownmenu">
...
</ul>
</li>
...
</ul>

Navbar
Default navbar
Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in
mobile views and become horizontal as the available viewport width increases.

Justied navbar nav links are currently not supported.

Over owing content


Since Bootstrap doesn't know how much space the content in your navbar needs, you might run into issues with content wrapping into a
second row. To resolve this, you can:

a. Reduce the amount or width of navbar items.


b. Hide certain navbar items at certain screen sizes using responsive utility classes (../css/#responsive-utilities).
c. Change the point at which your navbar switches between collapsed and horizontal mode. Customize the

@gridfloatbreakpoint

variable or add your own media query.

Requires JavaScript plugin


If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view
the content within the

.navbarcollapse

The responsive navbar requires the collapse plugin (../javascript/#collapse) to be included in your version of Bootstrap.

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

18/39

4/3/2016

ComponentsBootstrap

Changing the collapsed mobile navbar breakpoint


The navbar collapses into its vertical mobile view when the viewport is narrower than
horizontal non-mobile view when the viewport is at least
when the navbar collapses/expands. The default value is

@gridfloatbreakpoint
768px

@gridfloatbreakpoint

, and expands into its

in width. Adjust this variable in the Less source to control

(the smallest "small" or "tablet" screen).

Make navbars accessible


Be sure to use a

<nav>

element or, if using a more generic element such as a

<div>

, add a

role="navigation"

to every navbar to

explicitly identify it as a landmark region for users of assistive technologies.

EXAMPLE

<navclass="navbarnavbardefault">
<divclass="containerfluid">
<!Brandandtogglegetgroupedforbettermobiledisplay>
<divclass="navbarheader">
<buttontype="button"class="navbartogglecollapsed"datatoggle="collapse"datatarget="#bsexamplenavbar
collapse1"ariaexpanded="false">
<spanclass="sronly">Togglenavigation</span>
<spanclass="iconbar"></span>
<spanclass="iconbar"></span>
<spanclass="iconbar"></span>
</button>
<aclass="navbarbrand"href="#">Brand</a>
</div>
<!Collectthenavlinks,forms,andothercontentfortoggling>
<divclass="collapsenavbarcollapse"id="bsexamplenavbarcollapse1">
<ulclass="navnavbarnav">
<liclass="active"><ahref="#">Link<spanclass="sronly">(current)</span></a></li>
<li><ahref="#">Link</a></li>
<liclass="dropdown">
<ahref="#"class="dropdowntoggle"datatoggle="dropdown"role="button"ariahaspopup="true"aria
expanded="false">Dropdown<spanclass="caret"></span></a>
<ulclass="dropdownmenu">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Onemoreseparatedlink</a></li>
</ul>
</li>
</ul>
<formclass="navbarformnavbarleft"role="search">
<divclass="formgroup">
<inputtype="text"class="formcontrol"placeholder="Search">
</div>
<buttontype="submit"class="btnbtndefault">Submit</button>
</form>
<ulclass="navnavbarnavnavbarright">
<li><ahref="#">Link</a></li>
<liclass="dropdown">
<ahref="#"class="dropdowntoggle"datatoggle="dropdown"role="button"ariahaspopup="true"aria
expanded="false">Dropdown<spanclass="caret"></span></a>
<ulclass="dropdownmenu">
<li><ahref="#">Action</a></li>
<li><ahref="#">Anotheraction</a></li>
<li><ahref="#">Somethingelsehere</a></li>
<lirole="separator"class="divider"></li>
<li><ahref="#">Separatedlink</a></li>
</ul>
</li>
</ul>
</div><!/.navbarcollapse>
</div><!/.containerfluid>
</nav>

Brand image
Replace the navbar brand with your own image by swapping the text for an

<img>

. Since the

.navbarbrand

has its own padding and height, you

may need to override some CSS depending on your image.

EXAMPLE

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

19/39

4/3/2016

ComponentsBootstrap

<navclass="navbarnavbardefault">
<divclass="containerfluid">
<divclass="navbarheader">
<aclass="navbarbrand"href="#">
<imgalt="Brand"src="...">
</a>
</div>
</div>
</nav>

Forms
Place form content within

.navbarform

for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to

decide where it resides within the navbar content.

As a heads up,

.navbarform

shares much of its code with

.forminline

via mixin. Some form controls, like input groups, may require xed

widths to be show up properly within a navbar.

EXAMPLE

<formclass="navbarformnavbarleft"role="search">
<divclass="formgroup">
<inputtype="text"class="formcontrol"placeholder="Search">
</div>
<buttontype="submit"class="btnbtndefault">Submit</button>
</form>

Mobile device caveats


There are some caveats regarding using form controls within

xed

elements on mobile devices. See our browser support docs (../getting-

started/#support-xed-position-keyboards) for details.

Always add labels


Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels
using the

.sronly

arialabelledby

or

but note that use of

class. There are further alternative methods of providing a label for assistive technologies, such as the

title

attribute. If none of these is present, screen readers may resort to using the

placeholder

placeholder

arialabel

attribute, if present,

as a replacement for other labelling methods is not advised.

Buttons
Add the

.navbarbtn

class to

<button>

elements not residing in a

<form>

to vertically center them in the navbar.

EXAMPLE

<buttontype="button"class="btnbtndefaultnavbarbtn">Signin</button>

c usage

Context-speci

Like the standard button classes (../css/#buttons),

btn

.navbarbtn

nor the standard button classes should be used on

<a>

can be used on

elements within

<a>

and

.navbarnav

<input>

elements. However, neither

.navbar

Text
Wrap strings of text in an element with

.navbartext

, usually on a

<p>

tag for proper leading and color.

EXAMPLE

<pclass="navbartext">SignedinasMarkOtto</p>

Non-nav links
For folks using standard links that are not within the regular navbar navigation component, use the

.navbarlink

class to add the proper colors for

the default and inverse navbar options.

EXAMPLE

<pclass="navbartextnavbarright">Signedinas<ahref="#"class="navbarlink">MarkOtto</a></p>

Component alignment

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

20/39

4/3/2016

ComponentsBootstrap

Align nav links, forms, buttons, or text, using the

.navbarleft

direction. For example, to align nav links, put them in a separate

These classes are mixin-ed versions of

.pullleft

and

or

.navbarright

<ul>

.pullright

utility classes. Both classes will add a CSS

oat

in the specied

with the respective utility class applied.

, but they're scoped to media queries for easier handling of navbar

components across device sizes.

Right aligning multiple components


Navbars currently have a limitation with multiple

.navbarright

.navbarright

classes. To properly space content, we use negative margin on the last

element. When there are multiple elements using that class, these margins don't work as intended.

We'll revisit this when we can rewrite that component in v4.

Fixed to top
Add

.navbarfixedtop

and include a

.container

or

.containerfluid

to center and pad navbar content.

EXAMPLE

<navclass="navbarnavbardefaultnavbarfixedtop">
<divclass="container">
...
</div>
</nav>

Body padding required


The

xed

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.

body{paddingtop:70px;}

Make sure to include this after the core Bootstrap CSS.

Fixed to bottom
Add

.navbarfixedbottom

and include a

.container

.containerfluid

or

to center and pad navbar content.

EXAMPLE

<navclass="navbarnavbardefaultnavbarfixedbottom">
<divclass="container">
...
</div>
</nav>

Body padding required


The

xed

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.

body{paddingbottom:70px;}

Make sure to include this after the core Bootstrap CSS.

Static top
Create a full-width navbar that scrolls away with the page by adding

.navbarstatictop

and include a

.container

or

.containerfluid

to

center and pad navbar content.

Unlike the

.navbarfixed*

classes, you do not need to change any padding on the

body

EXAMPLE

<navclass="navbarnavbardefaultnavbarstatictop">
<divclass="container">
...
</div>
</nav>

Inverted navbar
Modify the look of the navbar by adding

.navbarinverse

EXAMPLE

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

21/39

4/3/2016

ComponentsBootstrap

<navclass="navbarnavbarinverse">
...
</nav>

Breadcrumbs
Indicate the current page's location within a navigational hierarchy.

Separators are automatically added in CSS through

:before

and

content

EXAMPLE

Home

Home

/ Library

Home

/ Library

/ Data

<olclass="breadcrumb">
<li><ahref="#">Home</a></li>
<li><ahref="#">Library</a></li>
<liclass="active">Data</li>
</ol>

Pagination
Provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.

Default 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.

EXAMPLE

<nav>
<ulclass="pagination">
<li>
<ahref="#"arialabel="Previous">
<spanariahidden="true">&laquo;</span>
</a>
</li>
<li><ahref="#">1</a></li>
<li><ahref="#">2</a></li>
<li><ahref="#">3</a></li>
<li><ahref="#">4</a></li>
<li><ahref="#">5</a></li>
<li>
<ahref="#"arialabel="Next">
<spanariahidden="true">&raquo;</span>
</a>
</li>
</ul>
</nav>

Disabled and active states


Links are customizable for different circumstances. Use

.disabled

for unclickable links and

.active

to indicate the current page.

EXAMPLE

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

22/39

4/3/2016

ComponentsBootstrap

<nav>
<ulclass="pagination">
<liclass="disabled"><ahref="#"arialabel="Previous"><spanariahidden="true">&laquo;</span></a></li>
<liclass="active"><ahref="#">1<spanclass="sronly">(current)</span></a></li>
...
</ul>
</nav>

You can optionally swap out active or disabled anchors for

<span>

, or omit the anchor in the case of the previous/next arrows, to remove click

functionality while retaining intended styles.

<nav>
<ulclass="pagination">
<liclass="disabled">
<span>
<spanariahidden="true">&laquo;</span>
</span>
</li>
<liclass="active">
<span>1<spanclass="sronly">(current)</span></span>
</li>
...
</ul>
</nav>

Sizing
Fancy larger or smaller pagination? Add

.paginationlg

or

.paginationsm

for additional sizes.

EXAMPLE

<nav><ulclass="paginationpaginationlg">...</ul></nav>
<nav><ulclass="pagination">...</ul></nav>
<nav><ulclass="paginationpaginationsm">...</ul></nav>

Pager
Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.

Default example
By default, the pager centers links.

EXAMPLE

Previous

Next

<nav>
<ulclass="pager">
<li><ahref="#">Previous</a></li>
<li><ahref="#">Next</a></li>
</ul>
</nav>

Aligned links
Alternatively, you can align each link to the sides:

EXAMPLE

Older

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

Newer

23/39

4/3/2016

ComponentsBootstrap

<nav>
<ulclass="pager">
<liclass="previous"><ahref="#"><spanariahidden="true">&larr;</span>Older</a></li>
<liclass="next"><ahref="#">Newer<spanariahidden="true">&rarr;</span></a></li>
</ul>
</nav>

Optional disabled state


Pager links also use the general

.disabled

utility class from the pagination.

EXAMPLE

Older

Newer

<nav>
<ulclass="pager">
<liclass="previousdisabled"><ahref="#"><spanariahidden="true">&larr;</span>Older</a></li>
<liclass="next"><ahref="#">Newer<spanariahidden="true">&rarr;</span></a></li>
</ul>
</nav>

Labels
Example
EXAMPLE

Example heading
Example heading
Example heading
Example heading
Example heading
Example heading

New

New

New

New

New

New

<h3>Exampleheading<spanclass="labellabeldefault">New</span></h3>

Available variations
Add any of the below mentioned modier classes to change the appearance of a label.

EXAMPLE

Default

Primary

Success

Info

Warning

Danger

<spanclass="labellabeldefault">Default</span>
<spanclass="labellabelprimary">Primary</span>
<spanclass="labellabelsuccess">Success</span>
<spanclass="labellabelinfo">Info</span>
<spanclass="labellabelwarning">Warning</span>
<spanclass="labellabeldanger">Danger</span>

Have tons of labels?


Rendering problems can arise when you have dozens of inline labels within a narrow container, each containing its own
element (like an icon). The way around this is setting

display:inlineblock;

inlineblock

. For context and an example, see #13219

(https://github.com/twbs/bootstrap/issues/13219).

Badges
Easily highlight new or unread items by adding a

<spanclass="badge">

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

to links, Bootstrap navs, and more.

24/39

4/3/2016

ComponentsBootstrap

EXAMPLE

Inbox

42

Messages

<ahref="#">Inbox<spanclass="badge">42</span></a>
<buttonclass="btnbtnprimary"type="button">
Messages<spanclass="badge">4</span>
</button>

Self collapsing
When there are no new or unread items, badges will simply collapse (via CSS's

:empty

selector) provided no content exists within.

Cross-browser compatibility
Badges won't self collapse in Internet Explorer 8 because it lacks support for the

:empty

selector.

Adapts to active nav states


Built-in styles are included for placing badges in active states in pill navigations.

EXAMPLE

Home

42

Prole

Messages

<ulclass="navnavpills"role="tablist">
<lirole="presentation"class="active"><ahref="#">Home<spanclass="badge">42</span></a></li>
<lirole="presentation"><ahref="#">Profile</a></li>
<lirole="presentation"><ahref="#">Messages<spanclass="badge">3</span></a></li>
</ul>

Jumbotron
A lightweight,

exible

component that can optionally extend the entire viewport to showcase key content on your site.

EXAMPLE

Hello, world!
This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content
or information.

Learn more

<divclass="jumbotron">
<h1>Hello,world!</h1>
<p>...</p>
<p><aclass="btnbtnprimarybtnlg"href="#"role="button">Learnmore</a></p>
</div>

To make the jumbotron full width, and without rounded corners, place it outside all

.container

s and instead add a

.container

within.

<divclass="jumbotron">
<divclass="container">
...
</div>
</div>

Page header
http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

25/39

4/3/2016
A simple shell for an

ComponentsBootstrap
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

Example page header

Subtext for header

<divclass="pageheader">
<h1>Examplepageheader<small>Subtextforheader</small></h1>
</div>

Thumbnails
Extend Bootstrap's grid system (../css/#grid) with the thumbnail component to easily display grids of images, videos, text, and more.

If you're looking for Pinterest-like presentation of thumbnails of varying heights and/or widths, you'll need to use a third-party plugin such as
Masonry (http://masonry.desandro.com), Isotope (http://isotope.metazzy.co), or Salvattore (http://salvattore.com).

Default example
By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.

EXAMPLE

171x180

171x180

171x180

171x180

<divclass="row">
<divclass="colxs6colmd3">
<ahref="#"class="thumbnail">
<imgsrc="..."alt="...">
</a>
</div>
...
</div>

Custom content
With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

EXAMPLE

242x200

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple
Thumbnail label

26/39

4/3/2016

ComponentsBootstrap

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.

Button

Button

242x200

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.

Button

Button

242x200

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.

Button

Button

<divclass="row">
<divclass="colsm6colmd4">
<divclass="thumbnail">
<imgsrc="..."alt="...">
<divclass="caption">
<h3>Thumbnaillabel</h3>
<p>...</p>
<p><ahref="#"class="btnbtnprimary"role="button">Button</a><ahref="#"class="btnbtndefault"
role="button">Button</a></p>
</div>
</div>
</div>
</div>

Alerts
Provide contextual feedback messages for typical user actions with the handful of available and exible alert messages.

Examples
Wrap any text and an optional dismiss button in

.alert

and one of the four contextual classes (e.g.,

.alertsuccess

) for basic alert messages.

No default class
Alerts don't have default classes, only base and modier classes. A default gray alert doesn't make too much sense, so you're required to
specify a type via contextual class. Choose from success, info, warning, or danger.

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

27/39

4/3/2016

ComponentsBootstrap

EXAMPLE

Well done! You successfully read this important alert message.

Heads up! This alert needs your attention, but it's not super important.

Warning! Better check yourself, you're not looking too good.

Oh snap! Change a few things up and try submitting again.

<divclass="alertalertsuccess"role="alert">...</div>
<divclass="alertalertinfo"role="alert">...</div>
<divclass="alertalertwarning"role="alert">...</div>
<divclass="alertalertdanger"role="alert">...</div>

Dismissible alerts
Build on any alert by adding an optional

.alertdismissible

and close button.

Requires JavaScript alert plugin


For fully functioning, dismissible alerts, you must use the alerts JavaScript plugin (../javascript/#alerts).

EXAMPLE

Warning! Better check yourself, you're not looking too good.

<divclass="alertalertwarningalertdismissible"role="alert">
<buttontype="button"class="close"datadismiss="alert"arialabel="Close"><spanariahidden="true">&times;</span>
</button>
<strong>Warning!</strong>Bettercheckyourself,you'renotlookingtoogood.
</div>

Ensure proper behavior across all devices


Be sure to use the

<button>

element with the

datadismiss="alert"

data attribute.

Links in alerts
Use the

.alertlink

utility class to quickly provide matching colored links within any alert.

EXAMPLE

Well done! You successfully read this important alert message.

Heads up! This alert needs your attention, but it's not super important.

Warning! Better check yourself, you're not looking too good.

Oh snap! Change a few things up and try submitting again.

<divclass="alertalertsuccess"role="alert">
<ahref="#"class="alertlink">...</a>
</div>
<divclass="alertalertinfo"role="alert">
<ahref="#"class="alertlink">...</a>
</div>
<divclass="alertalertwarning"role="alert">
<ahref="#"class="alertlink">...</a>
</div>
<divclass="alertalertdanger"role="alert">
<ahref="#"class="alertlink">...</a>
</div>

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

28/39

4/3/2016

ComponentsBootstrap

Progress bars
Provide up-to-date feedback on the progress of a workow or action with simple yet exible 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.

Content Security Policy (CSP) compatibility


If your website has a Content Security Policy (CSP) (https://developer.mozilla.org/en-US/docs/Web/Security/CSP) which doesn't allow

stylesrc'unsafeinline'

, then you won't be able to use inline

style

attributes to set progress bar widths as shown in our examples

below. Alternative methods for setting the widths that are compatible with strict CSPs include using a little custom JavaScript (that sets

element.style.width

) or using custom CSS classes.

Basic example
Default progress bar.

EXAMPLE

<divclass="progress">
<divclass="progressbar"role="progressbar"ariavaluenow="60"ariavaluemin="0"ariavaluemax="100"style="width:
60%;">
<spanclass="sronly">60%Complete</span>
</div>
</div>

With label
Remove the

<span>

with

.sronly

class from within the progress bar to show a visible percentage.

EXAMPLE

60%

<divclass="progress">
<divclass="progressbar"role="progressbar"ariavaluenow="60"ariavaluemin="0"ariavaluemax="100"style="width:
60%;">
60%
</div>
</div>

To ensure that the label text remains legible even for low percentages, consider adding a

minwidth

to the progress bar.

EXAMPLE

0%

2%

<divclass="progress">
<divclass="progressbar"role="progressbar"ariavaluenow="0"ariavaluemin="0"ariavaluemax="100"style="minwidth:
2em;">
0%
</div>
</div>
<divclass="progress">
<divclass="progressbar"role="progressbar"ariavaluenow="2"ariavaluemin="0"ariavaluemax="100"style="minwidth:
2em;width:2%;">
2%
</div>
</div>

Contextual alternatives
Progress bars use some of the same button and alert classes for consistent styles.

EXAMPLE

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

29/39

4/3/2016

ComponentsBootstrap

<divclass="progress">
<divclass="progressbarprogressbarsuccess"role="progressbar"ariavaluenow="40"ariavaluemin="0"aria
valuemax="100"style="width:40%">
<spanclass="sronly">40%Complete(success)</span>
</div>
</div>
<divclass="progress">
<divclass="progressbarprogressbarinfo"role="progressbar"ariavaluenow="20"ariavaluemin="0"ariavaluemax="100"
style="width:20%">
<spanclass="sronly">20%Complete</span>
</div>
</div>
<divclass="progress">
<divclass="progressbarprogressbarwarning"role="progressbar"ariavaluenow="60"ariavaluemin="0"aria
valuemax="100"style="width:60%">
<spanclass="sronly">60%Complete(warning)</span>
</div>
</div>
<divclass="progress">
<divclass="progressbarprogressbardanger"role="progressbar"ariavaluenow="80"ariavaluemin="0"aria
valuemax="100"style="width:80%">
<spanclass="sronly">80%Complete(danger)</span>
</div>
</div>

Striped
Uses a gradient to create a striped effect. Not available in IE9 and below.

EXAMPLE

<divclass="progress">
<divclass="progressbarprogressbarsuccessprogressbarstriped"role="progressbar"ariavaluenow="40"aria
valuemin="0"ariavaluemax="100"style="width:40%">
<spanclass="sronly">40%Complete(success)</span>
</div>
</div>
<divclass="progress">
<divclass="progressbarprogressbarinfoprogressbarstriped"role="progressbar"ariavaluenow="20"ariavaluemin="0"
ariavaluemax="100"style="width:20%">
<spanclass="sronly">20%Complete</span>
</div>
</div>
<divclass="progress">
<divclass="progressbarprogressbarwarningprogressbarstriped"role="progressbar"ariavaluenow="60"aria
valuemin="0"ariavaluemax="100"style="width:60%">
<spanclass="sronly">60%Complete(warning)</span>
</div>
</div>
<divclass="progress">
<divclass="progressbarprogressbardangerprogressbarstriped"role="progressbar"ariavaluenow="80"aria
valuemin="0"ariavaluemax="100"style="width:80%">
<spanclass="sronly">80%Complete(danger)</span>
</div>
</div>

Animated
Add

.active

to

.progressbarstriped

to animate the stripes right to left. Not available in IE9 and below.

EXAMPLE

Toggle animation

<divclass="progress">
<divclass="progressbarprogressbarstripedactive"role="progressbar"ariavaluenow="45"ariavaluemin="0"aria
valuemax="100"style="width:45%">
<spanclass="sronly">45%Complete</span>
</div>
</div>

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

30/39

4/3/2016

ComponentsBootstrap

Stacked
Place multiple bars into the same

.progress

to stack them.

EXAMPLE

<divclass="progress">
<divclass="progressbarprogressbarsuccess"style="width:35%">
<spanclass="sronly">35%Complete(success)</span>
</div>
<divclass="progressbarprogressbarwarningprogressbarstriped"style="width:20%">
<spanclass="sronly">20%Complete(warning)</span>
</div>
<divclass="progressbarprogressbardanger"style="width:10%">
<spanclass="sronly">10%Complete(danger)</span>
</div>
</div>

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 media
The default media displays a media object (images, video, audio) to the left or right of a content block.

EXAMPLE

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.

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. 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.

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.

<divclass="media">
<divclass="medialeft">
<ahref="#">
<imgclass="mediaobject"src="..."alt="...">
</a>
</div>
<divclass="mediabody">
<h4class="mediaheading">Mediaheading</h4>
...
</div>
</div>

The classes

.pullleft

and

.pullright

also exist and were previously used as part of the media component, but are deprecated for that use as

of v3.3.0. They are approximately equivalent to

body

.medialeft

and

.mediaright

, except that

.mediaright

should be placed after the

.media

in the html.

Media alignment
The images or other media can be aligned top, middle, or bottom. The default is top aligned.

EXAMPLE

Top aligned media


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.

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

31/39

4/3/2016

ComponentsBootstrap

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus.

Middle aligned media


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.

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus.

Bottom aligned media


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.

Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus.

<divclass="media">
<divclass="medialeftmediamiddle">
<ahref="#">
<imgclass="mediaobject"src="..."alt="...">
</a>
</div>
<divclass="mediabody">
<h4class="mediaheading">Middlealignedmedia</h4>
...
</div>
</div>

Media list
With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).

EXAMPLE

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.

<ulclass="medialist">
<liclass="media">
<divclass="medialeft">
<ahref="#">
<imgclass="mediaobject"src="..."alt="...">
</a>
</div>
<divclass="mediabody">
<h4class="mediaheading">Mediaheading</h4>
...
</div>
</li>
</ul>

List group
List groups are a exible and powerful component for displaying not only simple lists of elements, but complex ones with custom
content.

Basic example
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.

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

32/39

4/3/2016

ComponentsBootstrap

EXAMPLE

Cras justo odio

Dapibus ac facilisis in

Morbi leo risus

Porta ac consectetur ac

Vestibulum at eros

<ulclass="listgroup">
<liclass="listgroupitem">Crasjustoodio</li>
<liclass="listgroupitem">Dapibusacfacilisisin</li>
<liclass="listgroupitem">Morbileorisus</li>
<liclass="listgroupitem">Portaacconsecteturac</li>
<liclass="listgroupitem">Vestibulumateros</li>
</ul>

Badges
Add the badges component to any list group item and it will automatically be positioned on the right.

EXAMPLE

14

Cras justo odio

Dapibus ac facilisis in

Morbi leo risus

<ulclass="listgroup">
<liclass="listgroupitem">
<spanclass="badge">14</span>
Crasjustoodio
</li>
</ul>

Linked items
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.

EXAMPLE

Cras justo odio

Dapibus ac facilisis in

Morbi leo risus

Porta ac consectetur ac

Vestibulum at eros

<divclass="listgroup">
<ahref="#"class="listgroupitemactive">
Crasjustoodio
</a>
<ahref="#"class="listgroupitem">Dapibusacfacilisisin</a>
<ahref="#"class="listgroupitem">Morbileorisus</a>
<ahref="#"class="listgroupitem">Portaacconsecteturac</a>
<ahref="#"class="listgroupitem">Vestibulumateros</a>
</div>

Button items
List group items may be buttons instead of list items (that also means a parent
each element. Don't use the standard

.btn

<div>

instead of an

<ul>

). No need for individual parents around

classes here.

EXAMPLE

Cras justo odio

Dapibus ac facilisis in

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

33/39

4/3/2016

ComponentsBootstrap

Morbi leo risus

Porta ac consectetur ac

Vestibulum at eros

<divclass="listgroup">
<buttontype="button"class="listgroupitem">Crasjustoodio</button>
<buttontype="button"class="listgroupitem">Dapibusacfacilisisin</button>
<buttontype="button"class="listgroupitem">Morbileorisus</button>
<buttontype="button"class="listgroupitem">Portaacconsecteturac</button>
<buttontype="button"class="listgroupitem">Vestibulumateros</button>
</div>

Disabled items
Add

.disabled

to a

.listgroupitem

to gray it out to appear disabled.

EXAMPLE

Cras justo odio

Dapibus ac facilisis in

Morbi leo risus

Porta ac consectetur ac

Vestibulum at eros

<divclass="listgroup">
<ahref="#"class="listgroupitemdisabled">
Crasjustoodio
</a>
<ahref="#"class="listgroupitem">Dapibusacfacilisisin</a>
<ahref="#"class="listgroupitem">Morbileorisus</a>
<ahref="#"class="listgroupitem">Portaacconsecteturac</a>
<ahref="#"class="listgroupitem">Vestibulumateros</a>
</div>

Contextual classes
Use contextual classes to style list items, default or linked. Also includes

.active

state.

EXAMPLE

Dapibus ac facilisis in

Cras sit amet nibh libero

Porta ac consectetur ac

Vestibulum at eros

Dapibus ac facilisis in

Cras sit amet nibh libero

Porta ac consectetur ac

Vestibulum at eros

<ulclass="listgroup">
<liclass="listgroupitemlistgroupitemsuccess">Dapibusacfacilisisin</li>
<liclass="listgroupitemlistgroupiteminfo">Crassitametnibhlibero</li>
<liclass="listgroupitemlistgroupitemwarning">Portaacconsecteturac</li>
<liclass="listgroupitemlistgroupitemdanger">Vestibulumateros</li>
</ul>
<divclass="listgroup">
<ahref="#"class="listgroupitemlistgroupitemsuccess">Dapibusacfacilisisin</a>
<ahref="#"class="listgroupitemlistgroupiteminfo">Crassitametnibhlibero</a>
<ahref="#"class="listgroupitemlistgroupitemwarning">Portaacconsecteturac</a>
<ahref="#"class="listgroupitemlistgroupitemdanger">Vestibulumateros</a>
</div>

Custom content
http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

34/39

4/3/2016

ComponentsBootstrap

Custom content

Add nearly any HTML within, even for linked list groups like the one below.

EXAMPLE

List group item heading


Donec id elit non mi porta gravida at eget metus.
Maecenas sed diam eget risus varius blandit.

List group item heading


Donec id elit non mi porta gravida at eget metus.
Maecenas sed diam eget risus varius blandit.

List group item heading


Donec id elit non mi porta gravida at eget metus.
Maecenas sed diam eget risus varius blandit.

<divclass="listgroup">
<ahref="#"class="listgroupitemactive">
<h4class="listgroupitemheading">Listgroupitemheading</h4>
<pclass="listgroupitemtext">...</p>
</a>
</div>

Panels
While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.

Basic example
By default, all the

.panel

does is apply some basic border and padding to contain some content.

EXAMPLE

Basic panel example

<divclass="panelpaneldefault">
<divclass="panelbody">
Basicpanelexample
</div>
</div>

Panel with heading


Easily add a heading container to your panel with
styled heading. However, the font sizes of

<h1>

.panelheading
<h6>

. You may also include any

are overridden by

For proper link coloring, be sure to place links in headings within

.panelheading

.paneltitle

<h1>

<h6>

with a

.paneltitle

class to add a pre-

EXAMPLE

Panel heading without title

Panel content

Panel title

Panel content

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

35/39

4/3/2016

ComponentsBootstrap

<divclass="panelpaneldefault">
<divclass="panelheading">Panelheadingwithouttitle</div>
<divclass="panelbody">
Panelcontent
</div>
</div>
<divclass="panelpaneldefault">
<divclass="panelheading">
<h3class="paneltitle">Paneltitle</h3>
</div>
<divclass="panelbody">
Panelcontent
</div>
</div>

Panel with footer


Wrap buttons or secondary text in

.panelfooter

. Note that panel footers do not inherit colors and borders when using contextual variations as

they are not meant to be in the foreground.

EXAMPLE

Panel content

Panel footer

<divclass="panelpaneldefault">
<divclass="panelbody">
Panelcontent
</div>
<divclass="panelfooter">Panelfooter</div>
</div>

Contextual alternatives
Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.

EXAMPLE

Panel title

Panel content

Panel title

Panel content

Panel title

Panel content

Panel title

Panel content

Panel title

Panel content

<divclass="panelpanelprimary">...</div>
<divclass="panelpanelsuccess">...</div>
<divclass="panelpanelinfo">...</div>
<divclass="panelpanelwarning">...</div>
<divclass="panelpaneldanger">...</div>

With tables
Add any non-bordered

.table

within a panel for a seamless design. If there is a

.panelbody

, we add an extra border to the top of the table for

separation.

EXAMPLE

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

36/39

4/3/2016

ComponentsBootstrap

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.

First Name

Last Name

Username

Mark

Otto

@mdo

Jacob

Thornton

@fat

Larry

the Bird

@twitter

<divclass="panelpaneldefault">
<!Defaultpanelcontents>
<divclass="panelheading">Panelheading</div>
<divclass="panelbody">
<p>...</p>
</div>
<!Table>
<tableclass="table">
...
</table>
</div>

If there is no panel body, the component moves from panel header to table without interruption.

EXAMPLE

Panel heading

First Name

Last Name

Username

Mark

Otto

@mdo

Jacob

Thornton

@fat

Larry

the Bird

@twitter

<divclass="panelpaneldefault">
<!Defaultpanelcontents>
<divclass="panelheading">Panelheading</div>
<!Table>
<tableclass="table">
...
</table>
</div>

With list groups


Easily include full-width list groups within any panel.

EXAMPLE

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

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

37/39

4/3/2016

ComponentsBootstrap

<divclass="panelpaneldefault">
<!Defaultpanelcontents>
<divclass="panelheading">Panelheading</div>
<divclass="panelbody">
<p>...</p>
</div>
<!Listgroup>
<ulclass="listgroup">
<liclass="listgroupitem">Crasjustoodio</li>
<liclass="listgroupitem">Dapibusacfacilisisin</li>
<liclass="listgroupitem">Morbileorisus</li>
<liclass="listgroupitem">Portaacconsecteturac</li>
<liclass="listgroupitem">Vestibulumateros</li>
</ul>
</div>

Responsive embed
Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will
properly scale on any device.

Rules are directly applied to

responsiveitem

<iframe>

<embed>

<video>

, and

<object>

elements; optionally use an explicit descendant class

.embed

when you want to match the styling for other attributes.

Pro-Tip! You don't need to include

frameborder="0"

in your

<iframe>

s as we override that for you.

EXAMPLE

REO Speedwagon - Can't Fight This Feeling

<!16:9aspectratio>
<divclass="embedresponsiveembedresponsive16by9">
<iframeclass="embedresponsiveitem"src="..."></iframe>
</div>
<!4:3aspectratio>
<divclass="embedresponsiveembedresponsive4by3">
<iframeclass="embedresponsiveitem"src="..."></iframe>
</div>

Wells
Default well
Use the well as a simple effect on an element to give it an inset effect.

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

38/39

4/3/2016

ComponentsBootstrap

EXAMPLE

Look, I'm in a well!

<divclass="well">...</div>

Optional classes
Control padding and rounded corners with two optional modier classes.

EXAMPLE

Look, I'm in a large well!

<divclass="wellwelllg">...</div>

EXAMPLE

Look, I'm in a small well!

<divclass="wellwellsm">...</div>

GitHub (https://github.com/twbs/bootstrap)

Twitter (https://twitter.com/getbootstrap)

Examples (../getting-started/#examples)

About (../about/)

Designed and built with all the love in the world by @mdo (https://twitter.com/mdo) and @fat (https://twitter.com/fat). Maintained by the core team
(https://github.com/orgs/twbs/people) with the help of our contributors (https://github.com/twbs/bootstrap/graphs/contributors).

Code licensed MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE), docs CC BY 3.0 (https://creativecommons.org/licenses/by/3.0/).

http://getbootstrap.com/components/#inputgroupsbuttonsmultiple

39/39

You might also like