banner ads

Buttons

Tags

Use the button classes on an <a>, <button>, or <input> element.

Context-specific usage

While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

Links acting as buttons

If the <a> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate role="button".

Cross-browser rendering

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering. Among other things, there's a bug in Firefox <30 that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

Options

Use any of the available button classes to quickly create a styled button.

Example

Usage

<button class='btn btn-default'>Default</button>
<button class='btn btn-turquoise'>Turquoise</button>
<button class='btn btn-green'>Green</button>
<button class='btn btn-blue'>Blue</button>
<button class='btn btn-violet'>Violet</button>
<button class='btn btn-midnight'>Midnight</button>
<button class='btn btn-yellow'>Yellow</button>
<button class='btn btn-orange'>Orange</button>
<button class='btn btn-red'>Red</button>
<button class='btn btn-grey'>Grey</button>

Conveying meaning to assistive technologies

Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the .sr-only class.

Sizes

Fancy larger or smaller buttons? Add .btn-lg, .btn-sm, or .btn-xs for additional sizes

Extra Small .btn-xs

Usage

<button class='btn btn-default btn-xs'>Default</button>
<button class='btn btn-turquoise btn-xs'>Turquoise</button>
<button class='btn btn-green btn-xs'>Green</button>
<button class='btn btn-blue btn-xs'>Blue</button>
<button class='btn btn-violet btn-xs'>Violet</button>
<button class='btn btn-midnight btn-xs'>Midnight</button>
<button class='btn btn-yellow btn-xs'>Yellow</button>
<button class='btn btn-orange btn-xs'>Orange</button>
<button class='btn btn-red btn-xs'>Red</button>
<button class='btn btn-grey btn-xs'>Grey</button>

Small .btn-sm

Usage

<button class='btn btn-default btn-sm'>Default</button>
<button class='btn btn-turquoise btn-sm'>Turquoise</button>
<button class='btn btn-green btn-sm'>Green</button>
<button class='btn btn-blue btn-sm'>Blue</button>
<button class='btn btn-violet btn-sm'>Violet</button>
<button class='btn btn-midnight btn-sm'>Midnight</button>
<button class='btn btn-yellow btn-sm'>Yellow</button>
<button class='btn btn-orange btn-sm'>Orange</button>
<button class='btn btn-red btn-sm'>Red</button>
<button class='btn btn-grey btn-sm'>Grey</button>

Large .btn-lg

Usage

<button class='btn btn-default btn-lg'>Default</button>
<button class='btn btn-turquoise btn-lg'>Turquoise</button>
<button class='btn btn-green btn-lg'>Green</button>
<button class='btn btn-blue btn-lg'>Blue</button>
<button class='btn btn-violet btn-lg'>Violet</button>
<button class='btn btn-midnight btn-lg'>Midnight</button>
<button class='btn btn-yellow btn-lg'>Yellow</button>
<button class='btn btn-orange btn-lg'>Orange</button>
<button class='btn btn-red btn-lg'>Red</button>
<button class='btn btn-grey btn-lg'>Grey</button>

Custom

Custom button with Icon and Tooltip

Icon (FontAwesome)

Usage

<button class='btn btn-default'><i class='fa fa-rub'></i> Button</button>
<button class='btn btn-turquoise'><i class='fa fa-btc'></i> Button</button>
<button class='btn btn-green'><i class='fa fa-usd'></i> Button</button>
<button class='btn btn-blue'><i class='fa fa-eur'></i> Button</button>
<button class='btn btn-violet'><i class='fa fa-won'></i> Button</button>
<button class='btn btn-midnight'><i class='fa fa-yen'></i> Button</button>
<button class='btn btn-yellow'><i class='fa fa-rupee'></i> Button</button>
<button class='btn btn-orange'><i class='fa fa-gbp'></i> Button</button>
<button class='btn btn-red'><i class='fa fa-rmb'></i> Button</button>
<button class='btn btn-grey'><i class='fa fa-try'></i> Button</button>

Button Tooltip .btn-tooltip

Usage

<button class='btn-tooltip btn btn-default' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-turquoise' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-green' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-blue' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-violet' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-midnight' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-yellow' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-orange' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-red' title='Tooltip'>Button</button>
<button class='btn-tooltip btn btn-grey' title='Tooltip'>Button</button>