Buttons

Buttons should serve as the highest-priority calls-to-action on a page. They should be used for task flows, applications and other crucial actions. If the CTA is for navigation, then use a Link Styled as a Button.

Coded Components

Helper classes: Looking for a complete list of helper classes for these components?View helper classes

Redlines: We don't include redline comps because it's always more accurate to use developer tools to inspect the coded components, or a plugin such as the Prism Redline Tool.

Primary Non-Purchase Button

<div class="dds__mb-2"><button role="button" type="button" class="dds__btn dds__btn-primary dds__text-truncate">Primary Button</button></div>
<div class="dds__mb-2"> <button role="button" type="button" class="dds__btn dds__btn-primary dds__text-truncate"> <svg focusable="false" class="dds__svg-icons" style="width: 16px; height: 16px;"> <use xlink:href="#dds__gear" class="dds__svg-icons-item dds__show"></use> </svg> Example With Icon </button>
</div>
<div class="dds__mb-2"> <button role="button" type="button" class="dds__btn dds__btn-primary dds__text-truncate"> Example With Icon <svg focusable="false" class="dds__svg-icons" style="width: 16px; height: 16px;"><use xlink:href="#dds__gear" class="dds__svg-icons-item dds__show"></use></svg> </button>
</div>
<div> <button role="button" type="button" class="dds__btn dds__btn-primary dds__text-truncate"> <svg focusable="false" class="dds__svg-icons" style="width: 16px; height: 16px;"><use xlink:href="#dds__gear" class="dds__svg-icons-item dds__show"></use></svg> </button>
</div>

Secondary Button

<button role="button" type="button" class="dds__btn dds__btn-secondary dds__text-truncate">Secondary Button</button>

Primary Purchase Button

<button role="button" type="button" class="dds__btn dds__btn-purchase dds__text-truncate">Purchase Button</button>

Primary Non-Purchase Mini Button

<button type="button" class="dds__btn dds__btn-primary dds__btn-sm dds__text-truncate">Primary Mini Button</button>

Secondary Mini Button

<button type="button" class="dds__btn dds__btn-secondary dds__btn-sm dds__text-truncate">Secondary Mini Button</button>

Primary Purchase Mini Button

<button type="button" class="dds__btn dds__btn-purchase dds__btn-sm dds__text-truncate">Purchase Mini Button</button>

Primary Non-Purchase Block Button

<button type="button" class="dds__btn dds__btn-primary dds__btn-block dds__text-truncate">Primary Block Button</button>

Secondary Block Button

<button type="button" class="dds__btn dds__btn-secondary dds__btn-block dds__text-truncate">Secondary Block Button</button>

Primary Purchase Block Button

<button type="button" class="dds__btn dds__btn-purchase dds__btn-block dds__text-truncate">Purchase Block Button</button>

Multi-select Dropdown Button

<div class="dds__btn-dropdown dds__multi-select" tabindex="-1"> <button class="dds__btn dds__btn-secondary dds__text-truncate dds__d-flex" data-toggle="dds__dropdown" data-target="#buttonMultiSelectDropdown" tabindex="0" aria-expanded="false" aria-controls="buttonDropdownPrimary"> <span class="dds__text-truncate dds__mb-0">Multi-select Dropdown Button</span> <svg class="dds__arrow-tri-solid-right dds__align-self-center dds__ml-1" viewBox="0 0 32 32" focusable="false" aria-hidden="true"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonMultiSelectDropdown" class="dds__button-dropdown-container dds__collapse" role="menu"> <li class="dds__dropdown-list-item dds__form-check" role="menuitemcheckbox" tabindex="0" aria-checked="false"> <label class="dds__form-check-label" for="multiSelectCheckboxName1"> <input type="checkbox" id="multiSelectCheckboxName1" name="multiSelectCheckboxName1" tabindex="-1" class="dds__form-check-input"> <span>Value 1</span> </label> </li> <li class="dds__dropdown-list-item dds__form-check" role="menuitemcheckbox" tabindex="0" aria-checked="false"> <label class="dds__form-check-label" for="multiSelectCheckboxName2"> <input type="checkbox" id="multiSelectCheckboxName2" name="multiSelectCheckboxName2" tabindex="-1" class="dds__form-check-input"> <span>Value 2</span> </label> </li> <li class="dds__dropdown-list-item dds__form-check" role="menuitemcheckbox" tabindex="0" aria-checked="false"> <label class="dds__form-check-label" for="multiSelectCheckboxName3"> <input type="checkbox" id="multiSelectCheckboxName3" name="multiSelectCheckboxName3" tabindex="-1" class="dds__form-check-input"> <span>Value 3</span> </label> </li> <li class="dds__dropdown-list-item dds__form-check" role="menuitemcheckbox" tabindex="0" aria-checked="false"> <label class="dds__form-check-label" for="multiSelectCheckboxName4"> <input type="checkbox" id="multiSelectCheckboxName4" name="multiSelectCheckboxName4" tabindex="-1" class="dds__form-check-input"> <span>Value 4</span> </label> </li> <li class="dds__dropdown-list-item dds__form-check" role="menuitemcheckbox" tabindex="0" aria-checked="false"> <label class="dds__form-check-label" for="multiSelectCheckboxName5"> <input type="checkbox" id="multiSelectCheckboxName5" name="multiSelectCheckboxName5" tabindex="-1" class="dds__form-check-input"> <span>Value 5</span> </label> </li> </ul>
</div>

Primary Non-Purchase Split Button

<div class="dds__mb-0 dds__btn-group dds__btn-dropdown" tabindex="-1" role="menu"> <button id="buttonSplitPrimaryTitle" class="dds__btn dds__btn-primary dds__text-truncate" onclick="javascript: void(0);"> Primary Split Button </button> <button class="dds__btn dds__btn-primary dds__btn-split-arrow dds__d-flex" tabindex="0" data-toggle="dds__dropdown" data-target="#buttonSplitPrimary" aria-expanded="false" aria-labelledby="buttonSplitPrimaryTitle"> <svg class="dds__arrow-tri-solid-right" viewBox="0 0 32 32" focusable="false"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonSplitPrimary" class="dds__button-dropdown-container dds__collapse dds__split-container" role="menu"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1">Secondary Action</button> </li> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Tertiary Link</a> </li> <hr class="dds__dropdown-divider" tabindex="-1"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Separate Link</a> </li> </ul>
</div>

Secondary Split Button

<div class="dds__mb-0 dds__btn-group dds__btn-dropdown" tabindex="-1" role="menu"> <button id="buttonSplitSecondaryTitle" class="dds__btn dds__btn-secondary dds__text-truncate" onclick="javascript: void(0);"> Secondary Split Button </button> <button class="dds__btn dds__btn-secondary dds__btn-split-arrow dds__d-flex" tabindex="0" data-toggle="dds__dropdown" data-target="#buttonSplitSecondary" aria-expanded="false" aria-labelledby="buttonSplitSecondaryTitle"> <svg class="dds__arrow-tri-solid-right" viewBox="0 0 32 32" focusable="false"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonSplitSecondary" class="dds__button-dropdown-container dds__collapse dds__split-container" role="menu"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1">Secondary Action</button> </li> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Tertiary Link</a> </li> <hr class="dds__dropdown-divider" tabindex="-1"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Separate Link</a> </li> </ul>
</div>

Primary Purchase Split Button

<div class="dds__mb-0 dds__btn-group dds__btn-dropdown" tabindex="-1" role="menu"> <button id="buttonSplitPurchaseTitle" class="dds__btn dds__btn-purchase dds__text-truncate" onclick="javascript: void(0);"> Primary Purchase Split Button </button> <button class="dds__btn dds__btn-purchase dds__btn-split-arrow dds__d-flex" tabindex="0" data-toggle="dds__dropdown" data-target="#buttonSplitPurchase" aria-expanded="false" aria-labelledby="buttonSplitPurchaseTitle"> <svg class="dds__arrow-tri-solid-right" viewBox="0 0 32 32" focusable="false"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonSplitPurchase" class="dds__button-dropdown-container dds__collapse dds__split-container" role="menu"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1">Secondary Action</button> </li> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Tertiary Link</a> </li> <hr class="dds__dropdown-divider" tabindex="-1"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Separate Link</a> </li> </ul>
</div>

Primary Non-Purchase Dropdown Button

<div class="dds__mb-0 dds__btn-dropdown" tabindex="-1"> <button class="dds__btn dds__btn-primary dds__text-truncate dds__d-flex" data-toggle="dds__dropdown" data-target="#buttonDropdownPrimary" tabindex="0" aria-expanded="false" aria-controls="buttonDropdownPrimary"> <span class="dds__text-truncate dds__mb-0">Primary Dropdown Button</span> <svg class="dds__arrow-tri-solid-right dds__align-self-center dds__ml-1" viewBox="0 0 32 32" focusable="false" aria-hidden="true"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonDropdownPrimary" class="dds__button-dropdown-container dds__collapse" role="menu"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1" >Secondary Link</a> </li> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1" >Tertiary Button</button> </li> <hr class="dds__dropdown-divider" tabindex="-1"></hr> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Separate Link</a> </li> </ul>
</div>

Secondary Dropdown Button

<div class="dds__mb-0 dds__btn-dropdown" tabindex="-1"> <button class="dds__btn dds__btn-secondary dds__text-truncate dds__d-flex" tabindex="0" data-toggle="dds__dropdown" data-target="#buttonDropdownSecondary" aria-expanded="false" aria-controls="buttonDropdownSecondary"> <span class="dds__text-truncate dds__mb-0">Secondary Dropdown Button </span> <svg class="dds__arrow-tri-solid-right dds__align-self-center dds__ml-1" viewBox="0 0 32 32" focusable="false" aria-hidden="true"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonDropdownSecondary" class="dds__button-dropdown-container dds__collapse" role="menu"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1" >Secondary Link</a> </li> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1" >Tertiary Action</button> </li> <hr class="dds__dropdown-divider" tabindex="-1"></hr> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1">Separate Action</button> </li> </ul>
</div> 

Primary Purchase Dropdown Button

<div class="dds__mb-0 dds__btn-dropdown" tabindex="-1"> <button class="dds__btn dds__btn-purchase dds__text-truncate dds__d-flex" data-toggle="dds__dropdown" data-target="#buttonDropdownPurchase" tabindex="0" aria-expanded="false" aria-controls="buttonDropdownPurchase"> <span class="dds__text-truncate dds__mb-0">Purchase Dropdown Button</span> <svg class="dds__arrow-tri-solid-right dds__align-self-center dds__ml-1" viewBox="0 0 32 32" focusable="false" aria-hidden="true"> <title>dds__arrow-tri-solid-right</title> <path d="M21.997 16.002l-11.994-12.356v24.708z"></path> </svg> </button> <ul id="buttonDropdownPurchase" class="dds__button-dropdown-container dds__collapse" role="menu"> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <button class="dds__dropdown-item dds__text-truncate" role="menuitem" onclick="javascript: void(0);" tabindex="-1" >Secondary Action</button> </li> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1" >Tertiary Link</a> </li> <hr class="dds__dropdown-divider" tabindex="-1"></hr> <li class="dds__dropdown-list-item" role="none" tabindex="0"> <a class="dds__dropdown-item dds__text-truncate" role="menuitem" href="#" tabindex="-1">Separate Link</a> </li> </ul>
</div>

Button Styled as a Link

<button class="dds__btn-link dds__text-truncate">Sample Link Button</button>

Toggle Button

<button class="dds__btn-toggle-container dds__btn-toggle" type="button" data-toggle="dds__button" role="switch" aria-checked="false" aria-label="button toggle example 1" style="width: 113.706px; visibility: visible;"> <span class="dds__toggle-txt-off" aria-hidden="false" style="">Off</span> <span class="dds__toggle-txt-on" aria-hidden="true" style="">On</span> <span class="dds__toggle-circle"></span>
</button>

Toggle Button with External Label

<div class="dds__btn-toggle-container" data-toggle="dds__button"> <label id="toggleLabel">Subscribe to emails: </label> <button class="dds__btn-toggle" type="button" role="switch" aria-checked="false" aria-labelledby="toggleLabel" style="visibility: visible;"> <span class="dds__toggle-txt-off" aria-hidden="false"></span> <span class="dds__toggle-txt-on" aria-hidden="true"></span> <span class="dds__toggle-circle" style="transform: translateX(0px);"></span> </button>
</div>

Disabled Buttons - Add "disabled" attribute to any button

<div class="dds__my-5"> <button role="button" type="button" class="dds__btn dds__btn-primary dds__text-truncate" disabled="">Primary Non-Purchase</button> <button type="button" class="dds__btn dds__btn-primary dds__btn-sm dds__text-truncate" disabled="">Primary Mini Button</button> <p> </p> <button type="button" class="dds__btn dds__btn-primary dds__btn-block dds__text-truncate" disabled="">Primary Block Button</button> <p></p><button class="dds__btn-toggle-container dds__btn-toggle" type="button" data-toggle="dds__button" role="switch" aria-checked="false" aria-label="button toggle disabled off" disabled="" style="width: 125.047px; visibility: visible;"> <span class="dds__toggle-txt-off" aria-hidden="false" style="">Disabled Off</span> <span class="dds__toggle-txt-on" aria-hidden="true" style="">Disabled On</span> <span class="dds__toggle-circle"></span> </button> <button class="dds__btn-toggle-container dds__btn-toggle" type="button" data-toggle="dds__button" role="switch" aria-checked="true" aria-label="button toggle disabled on" disabled="" style="width: 125.047px; visibility: visible;"> <span class="dds__toggle-txt-off" aria-hidden="true" style="">Disabled Off</span> <span class="dds__toggle-txt-on" aria-hidden="false" style="">Disabled On</span> <span class="dds__toggle-circle" style="transform: translateX(97.0469px);"></span></button>
</div>

Heading

No items found.

Usage

A button label should express, as clearly and succinctly as possible, the outcome of selecting the button. This is important for both UX and SEO.

Make the first word of the button label a verb. For example, "Buy It Now".

Different types or colors of buttons, help guide users through the purchase path, the learn path (non-purchase areas of the site), or through task flows and applications.

Button variations help fit the layout and intention of the page.

A general rule of thumb is, buttons are for actions and links are for navigation, although a navigation link may be styled as a button when that's the primary call-to-action on the page.

Grouping and Alignment: There should be no more than 3 buttons in a group, with only one primary CTA per group. One exception is the Compare button in product stacks.

Changes in Labels or Changes in States: If a button label or state can change from its page load state due to user interactions on the page, then the action triggering the change should be in close enough proximity that the button state change is evident to the user.

Icons within buttons: No more than one icon should appear within a button.

  • If the icon complements the label meaning (such as a magnifier with "Search") then it should be on the left of the label.
  • If the icon communicates button functionality (such as the triangle in a dropdown , or an X for removing a filter), then it should be on the right of the label.

Vertical alignment: The primary CTA should always be on top.

Horizontal alignment: In most cases, a button row should be left-aligned with the primary button in the first position. In a task flow or within a modal window, the button row should be right-aligned with the primary button in the final position so that less destructive actions are encountered first.

Button Height: The line height of button labels is intentionally larger than normal to ensure that buttons are the same height as similar targets, such as inputs.

Native Buttons: When implementing a true button,

  • <button></button>
  • <input type="button">
  • <input type="submit">
  • <input type="reset">
  • <input type="image">

Native HTML Buttons vs Styled Links

The general rule of thumb for a buttons is, if the user is taking an action on the page, use a button, if the user is navigating somewhere, use a styled hyperlink.

1. Can the CTA ever become disabled?

  • If YES, then use a native button.

2. Does the CTA behave like part of an application UI? Does it submit or reset a form? Trigger a modal or off-canvas? Add an item to the cart? Play media content?

  • If YES, then use a native button.

3. Is the CTA simply part of the browsing experience? Does it navigate to a new URL or view, or simply refresh the page?

Toggle Buttons

Toggle buttons may be disabled in either their On or Off state.

With an Internal Label

The width of a toggle button is determined by its internal label (i.e. whichever label, from its two states, is longer).

Each label should be a single word, and they should default to "On" and "Off" unless these words don't make sense for the two states. Replace these labels with caution.

With an External Label

Both of the internal labels may be replaced with a single external label that verbosely describes what the toggle button does. For example, "Subscribe to marketing emails".

When the label is external, users can select either the label or the button itself to toggle the button.

Toggle buttons that use an external label have a minimum width of 52px for the button itself.

Do's and Don'ts

Text Label

Buttons should use Title Case to indicate what will happen when the button is selected, with a text label that is 2-3 words max. Don't combine different actions in one label (exception: "Customize & Buy" within the product stack).

Icons

Max of 1 icon can be used inside a button. Place it on the left of the label if it complements the meaning of the text (e.g. magnifier with Search), and on the right if it explains the button functionality (e.g. triangle for a dropdown).

Button Type

Use the proper button variant and type.

Common Button Labels and Usage

Title case, 2-3 words maximum.
Do not combine actions in a label (exception: "Customize & Buy").
If standard labels don't fit the button's purpose, align label with the task the user is attempting.

Please refer to the Dell Technologies branding website, https://brand.delltechnologies.com/faq/#voice, for further information regarding call-to-action labels and usage.

Button Label:
Corresponding Action:
Add to Cart
Search
Cancel
Save
Edit
Delete
Continue
Next/Previous
Submit
Select
Sign In/Sign Out
View Details
Ok/Cancel
Learn More
Close
Takes users to Cart page, with item added
Used for search buttons
Takes users back to entry point for a task
Used to save an item
Navigates users to change an item
Deletes an item on the page, usually with a verification step
Used as progression
Used as forward and backward navigation (Next is primary, Previous is secondary)
Used to submit a task or info
Used for choosing items in a task flow
Authentication standard, for consistency do not use Log In/Log Out or Signin/Signout
Used instead of “Select” in cases of product details or within learn content
For use in modal verification steps when more specific CTAs will not fit due to space
Used to link users to more learning content or contextual help
Used within modal windows

Grouping and Alignment

  • There should be no more than 3 buttons in a group with only one primary CTA per group. One exception is the Compare button in product stacks after the user selects the Compare checkbox.
  • Vertical alignment: The primary CTA should always be on top.
  • Horizontal: In most cases, a button row should be left-aligned with the primary button in the first position. In a task flow or within a modal window, the button row should be right-aligned with the primary button in the final position.

        Examples:

Colors & Styles

Button color indicates a specific action type and should not be chosen due to subjective preference. The below notes will help determine which button and color should be used.

Purchase

Purchase Path - refers to the user's intent to purchasing a product.

  • Purchase refers to a user being only one step away from intent to purchase or purchasing. (This includes calling into purchase if it's the primary call to action on the page.)
  • Max of 3 buttons in a view of a product.
  • Primary: Should be placed in location of first priority. Only 1 primary button can be used.
  • Secondary: Should be placed in second or third priority. Up to 2 secondary buttons can be used.

Learn, App, or Task Flow & Cross-navigation

Learn Path refers to the users progression in navigating content-centric pages.

  • While not always linear, the learning path typically comprises a series of clicks through learning main pages > learning category pages > destination content (e.g., article) pages.
  • Max of 1 button in learn path; links can be used in conjunction.
  • Only primary treatment is used in Learn path.


Task Flow / Application refers to a task flow is a multi-step process in which users are led through a task (e.g., "Find a laptop for school") one page at a time.

  • Primary: Should be placed in location of first priority. Only 1 primary button can be used.
  • Secondary: Should be placed in subordinate position to Primary button. Up to 2 secondary buttons can be used.


Cross-navigation refers to an opportunity to navigate users between filters (or tabs) or navigating outside the hierarchy / site structure to another relevant area of content.

Accessibility

The A11Y Style Guide has excellent examples of markup for buttons.

The W3C Web Accessibility Initiative (WAI) develops standards and support materials to help you understand and implement accessibility.

Please follow the guidelines for buttons from WAI-ARIA authoring practices 1.1.

Please also refer to these recommendations for buttons from WAI-ARIA 1.1.

You may refer to these examples of buttons from WAI-ARIA authoring practices 1.1.

  • Also refer to the menu button examples (dropdown and split button) from WAI-ARIA authoring practices 1.1. Search the page for "menu button".

For multi-select dropdown buttons, also see the accessibility guidelines for checkboxes.