Buttons allow the user to move through a task by triggering single actions. The container gives the button visual impact and the text label communicates a clear purpose. Optionally, all button variants may include an <icon> to the left of the label.
Buttons classes are designed for <button> elements and <input>elements with attribute type=button. These classes can also be used to style <a>, however best practice is to avoid using links as buttons for semantic purposes.
<button class="c-button--primary">Button Text</button>
<button class="c-button">Button Text</button>
//Small Primary Button
<button class=c-button-small--primary>Button Text</button>
//Small Secondary Button
<button class=c-button-small>Button Text</button>
Primary, secondary and small buttons each have a default, hover/active and focus state. In addition, a disabled state is available.
<button class="c-button--disabled">Button Text</button>
The primary button should have prominence in a layout, either above or to the right of all other buttons.
Primary and secondary buttons have a minimum width of 100px. If this width cannot be accommodated, use small buttons instead. In mobile environments, single buttons, including small buttons, will automatically fill the full width of the screen. In tablet and desktop environments, buttons will fill 100% of their containing element.