A button performs an action in response to an object or selection, whereas a link is a navigational element that connects two places.

  • Use clear verbs for action names and keep them short to avoid clutter
  • Generally the button size should match the size of any input filds grouped with the button, with the default size recommended in most cases.
  • Large buttons are intended for calls to action, typically on a landing or sign in page.
  • Small buttons are most appropriate for small containers or secondary panels where space is constrained.
  • Do not use a small button exclusively to get more controls on the screen at once, as this can be overwhelming and increase cognitive load (https://en.wikipedia.org/wiki/Cognitive_load).

Base Button Styles

The style guides offer several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.

Using color to add meaning 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 (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .sr-only class.

Primary Buttons

A primary button conveys the most common or significant action on the page or relevenat context. It is typically used to submit information or commit a change, e.g. "Save."

A Small Primary Button A Primary Button A Large Primary Button

  • Generally there should only be one primary button in a given context (i.e., page, panel, task or step)
  • Avoid using a primary button for actions in repeated contexts such as table rows, since multiple primary buttons will no longer communicate "primary."

<a role="button" class="btn btn-sm btn-primary m-1" href="#">A Small Primary Button</a> <a role="button" class="btn btn-primary m-1" href="#">A Primary Button</a> <a role="button" class="btn btn-lg btn-primary m-1" href="#">A Large Primary Button</a>


Secondary Buttons

Use a secondary button for functions that are less significant than a primary button, or when there are multiple important actions with no clear "primary." There may be more than one secondary button.

A Small Secondary Button A Secondary Button A Large Secondary Button

<a role="button" class="btn btn-sm btn-secondary m-1" href="#">A Small Secondary Button</a> <a role="button" class="btn btn-secondary m-1" href="#">A Secondary Button</a> <a role="button" class="btn btn-lg btn-secondary m-1" href="#">A Large Secondary Button</a>


Tertiary Buttons

Tertiary buttons represent functions that are lower priority than a secondary button and provide other available actions, e.g. "Cancel."

A Small Tertiary Button A Tertiary Button A Large Tertiary Button

<a role="button" class="btn btn-sm btn-tertiary m-1" href="#">A Small Tertiary Button</a> <a role="button" class="btn btn-tertiary m-1" href="#">A Tertiary Button</a> <a role="button" class="btn btn-lg btn-tertiary m-1" href="#">A Large Tertiary Button</a>


Additional Buttons

Link as button


Button sizes

Add .btn-lg or .btn-sm for additional sizes.


<button type="button" class="btn btn-primary btn-lg m-1">Large button</button> <button type="button" class="btn btn-secondary btn-lg m-1">Large button</button> <button type="button" class="btn btn-primary btn-sm m-1">Small button</button> <button type="button" class="btn btn-secondary btn-sm m-1">Small button</button>
Button labels

Insert .btn-label class inside buttons and any icon inside it. Add .btn-label-right class if you want to put icon on right side.


<a role="button" href="#" class="btn btn-primary"><span class="btn-label"><i class="fa fa-check"></i></span>Primary</a> <a role="button" href="#" class="btn btn-secondary"><span class="btn-label"><i class="fa fa-times"></i></span>Danger</a> <a role="button" href="#" class="btn btn-tertiary"><span class="btn-label"><i class="fa fa-exclamation"></i></span>Info</a> <a role="button" href="#" class="btn btn-navy"><span class="btn-label"><i class="fa fa-warning"></i></span>Warning</a> <a role="button" href="#" class="btn btn-green"><span class="btn-label"><i class="fa fa-arrow-left"></i></span>Left</a> <a role="button" href="#" class="btn btn-green">Right<span class="btn-label btn-label-right"><i class="fa fa-arrow-right"></i></span></a>
Button group

Wrap a series of buttons with .btn in .btn-group.

In order for assistive technologies (such as screen readers) to convey that a series of buttons is grouped, an appropriate role attribute needs to be provided. For button groups, this would be role="group", while toolbars should have a role="toolbar".

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 aria-label, but alternatives such as aria-labelledby can also be used.


<div class="btn-toolbar mb-3" role="toolbar" aria-label="Toolbar with button groups"> <div class="btn-group mr-3" role="group" aria-label="Basic example"> <a role="button" class="btn btn-secondary" href="#">Left</a> <a role="button" class="btn btn-secondary" href="#">Middle</a> <a role="button" class="btn btn-secondary" href="#">Right</a> </div> <div class="input-group"> <span class="input-group-addon px-1 pt-1" id="btnGroupAddon"><h5>@</h5></span> <input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example" aria-describedby="btnGroupAddon" /> </div> </div>