Buttons allow the user to move through a task by triggering single actions. Button classes are designed for <button> elements and <input type="button"> elements. These classes can also style <a> elements as buttons, but best practice is to refrain from using links as buttons for semantic purposes.
<button class="c-button--primary">Button Text</button>
<button class="c-button">Button Text</button>
<button class="c-button--subtle">Button Text</button>
Every button variant has hover/active and focus pseudo-classes. Optional classes for disabled and loading are available.
<button class="c-button--disabled"role="button"aria-disabled="true">Button Text</button>
<button class="c-button-loading">
<span class="c-button-loading__item-1" />
<span class="c-button-loading__item-2" />
<span class="c-button-loading__item-3" />
</button>
<button class="c-button--primary-loading">
<span class="c-button--primary-loading__item-1" />
<span class="c-button--primary-loading__item-2" />
<span class="c-button--primary-loading__item-3" />
</button>
<button class="c-button--subtle-loading">
<span class="c-button--subtle-loading__item-1" />
<span class="c-button--subtle-loading__item-2" />
<span class="c-button--subtle-loading__item-3" />
</button>
Primary buttons will always take prominent placement to the right of or on top of other buttons. Inline buttons should follow the Dual Inline Action Group pattern. Use the following layout classes to keep space between horizontally stacked buttons:
<button class="c-button--primary l-margin-top--xlarge">Button Text</button>
<button class="c-button l-margin-top--xsmall">Button Text</button>