Buttons

Buttons allow users to take actions and make choices, with a single click.

Icon for component-button

Primary Button

Contains actions that are most important or common for the user, including default actions. Primary button is primary visually, not necessarily with position or order relating to secondary button.

1<button class="btn btn-primary">Primary Button</button>
Icon for copy

Secondary Button

1<button class="btn btn-secondary">Secondary Button</button>
Icon for copy

Dark Button

1<button class="btn btn-dark">Dark Button</button>
Icon for copy

Large Button

1<button class="btn btn-primary btn-lg">Button text</button>
Icon for copy

Light Button

1<button class="btn btn-light">Light Button</button>
Icon for copy

Medium Button

1<button class="btn btn-primary btn-md">Button text</button>
Icon for copy

Small Button

1<button class="btn btn-primary btn-sm">Button text</button>
Icon for copy

Accessibility

Make it clear what this button does for the user.

DO

  • Make it clear what this button does for the user.

  • Use at most two buttons in one group.

  • Attribute indicating if the element should be.

DON'T

  • Use more than two words for call to action.

  • First letter of each sentence defaults to a capital letter.

  • Attribute indicating if the element should be.


Classes

Complete list of all CSS classes for the component.

NameClass
Primary Buttonbutton button-primary
Secondary Buttonbutton button-secondary
Dark Buttonbutton button-dark
Large Buttonbutton button-large
Light Buttonbutton button-light
Medium Buttonbutton button-medium
Small Buttonbutton button-small