Components

Buttons

Buttons signal actions. They should be used sparingly; each additional button on a page reduces the visual prominence of a call to action. In contrast, links should lead users to another page or further information.

Types

Primary button

Use a primary button for an action that goes to the next step. Avoid using multiple primary buttons on a single page; there can be multiple secondary buttons per page.

HTML code snippet

<button class="a-btn" title="Default state">Default state</button>

<button class="a-btn hover" title="Hovered state">Hovered state</button>

<button class="a-btn focus" title="Focused state">Focused state</button>

<button class="a-btn active" title="Active state">Active state</button>

Implementation details

For accessibility reasons, use the semantic <button> instead of a link when possible.

Apply the a-btn class to a link, button and submit input field to receive the atomic button styles. For more information, see cf.gov refresh documentation on atomic styles.

Secondary button

Use a secondary button for actions that happen on the current page.

HTML code snippet

<button class="a-btn a-btn--secondary" title="Default state">Default state</button>

<button class="a-btn a-btn--secondary hover" title="Hovered state">Hovered state</button>

<button class="a-btn a-btn--secondary focus" title="Focused state">Focused state</button>

<button class="a-btn a-btn--secondary active" title="Active state">Active state</button>

Disabled button

HTML code snippet

<button class="a-btn a-btn--disabled" title="Default state" disabled>Default state</button>

<button class="a-btn a-btn--disabled hover" title="Hovered state" disabled>Hovered state</button>

<button class="a-btn a-btn--disabled focus" title="Focused state" disabled>Focused state</button>

Destructive button

HTML code snippet

<button class="a-btn a-btn--warning" title="Default state">Default state</button>

<button class="a-btn a-btn--warning hover" title="Hovered state">Hovered state</button>

<button class="a-btn a-btn--warning focus" title="Focused state">Focused state</button>

Destructive action

When paired with a primary action, indicate the destructive action using a destructive action button link to the right of the primary button.

HTML code snippet

<div class="m-btn-group">
    <button class="a-btn">Action</button>
    <button class="a-btn a-btn--link a-btn--warning">Destructive action</button>
</div>

Full-width button (on x-small screens)

Reduce screen size to see this button in action.

HTML code snippet

<button class="a-btn a-btn--full-on-xs" title="Default state">Default state</button>

<button class="a-btn a-btn--full-on-xs hover" title="Hovered state">Hovered state</button>

<button class="a-btn a-btn--full-on-xs focus" title="Focused state">Focused state</button>

<button class="a-btn a-btn--full-on-xs active" title="Active state">Active state</button>

Button group

HTML code snippet

<div class="m-btn-group">
    <button class="a-btn">Yes</button>
    <button class="a-btn">No</button>
    <button class="a-btn">Maybe</button>
</div>

Button with icon

An icon should appear after the text it represents. The only exception is the back button, in which the icon should appear before the button’s text. Each icon should be used exclusively and consistently for one action. Icons should never be underlined.

HTML code snippet

<button class="a-btn">
    <span class="a-btn__icon
                 a-btn__icon--on-left">
       
    </span>
    Back
</button>

<button class="a-btn">
    Next
    <span class="a-btn__icon
                 a-btn__icon--on-right">
        
    </span>
</button>

Button with animated icon

Use an animated icon in a button to reassure the user that the action they are attempting to perform is functioning as intended.

HTML code snippet

<button class="a-btn">
    Submit your complaint
    <span class="a-btn__icon
                 a-btn__icon--on-right"></span>
</button>

Printed button

When a consumerfinance.gov page is printed, buttons are presented as links. See Printed links on the Links page for specifications.

Latest Updates

Page last edited:
Show all details
Edit page