- When you have a primary or default action and want to include nested, related secondary actions
- When you want to consolidate buttons if when there are multiple actions a user can take that are related to each other
- If you only have one primary action without multiple secondary options needed, consider using a primary button and secondary button if needed
- If there is no default action in your group of actions
- When you want to have multiple selection options, consider using menu instead
| Variation | Description |
|---|
| Label | Ensure you have a clear, understandable label for the button that is concise and specific to the action that will occur if the button is used. |
| With Icon | Use an icon thats meaning is easily recognizable. Ideally, it should have same meaning across all our markets. To make sure your icons align, use icon before label. |
Split button is not navigation. Split button is made up of buttons and should allow users to perform an action on the page, or open up a modal. If you would like to have a navigation menu use navigation or links instead.
Avoid using too many overlay options with split button. If there needs to be more than eight options, reconsider your use case for the split button and consider using a different component.
Ensure that the button label is generic, allowing there to be a use case for the nested overlay. The icon is optional, but the primary action label is always required.
Do not remove the visual signifier separating the main action button from the nested actions icon button that reveals the nested actions. This can confuse the user as they will be unaware that selecting in a different area of the button will have a different function.
Button labels should be clear, brief and invite the customer to take action.
- Use a verb and noun construction, like “View Account Details”
- Be specific in the action a user is taking, like “Submit”
- Use consistent verbiage for common actions, like “View” to take a user to a new view
- Keep it short, target a length of one to three words with no more than five
- Use title case, like “Almost Every Word is Capitalized”
- Don’t use personal pronouns, such as “View my Account Details”
- Button labels need to be simple and easy to understand.
- For accessibility generic text, like “Learn More”, is not recommended, as it does not inform a user of the content behind the action. Headings and labels accessibility standards
- Remember that action should be brief. The longer a button text, the longer a user spends reading them.
Icons used in buttons should be simple, with well known visual metaphors a hand with a thumbs-up for feedback, pencil for edit, or a lock for security. For more information about icons in general, check out our icons.
- Use simple well known icons
- Take real world examples for example lock for security
- Be consistent. Always use the same icon for action.
- Think customer consistency. Follow the icon names available in our icon library for the actions when possible.
- Consider icon meaning and localization
- Use different icons for the same action
- Use the same icon for different actions
- Use complex icons
- Icons need to be simple and easy to understand.
- For accessibility, we need to make sure we use icons for the same meaning throughout our website. Consistent identification accessibility standards
- Remember: the more complex the icon, the longer a user spends understanding them.
Try to avoid using disabled buttons when possible, opting for enabled buttons or no button and an informative alternative, such as “out of stock”.
If you do choose to use a disable a button, our buttons use aria-disabled=true instead of disabled, so it’s announced to screen reader users.
- Avoid disabled buttons when possible
- Instead of a button try using an informative plain text alternative, like “out of stock”
- Use form validation
- Always provide a way out
- Use a disabled button to prevent information from being submitted twice e.g. double bookings
- Use
aria-disabled=true
- Don’t use disabled button labels to communicate information
- Disable the form submit until the form is complete
Disabled buttons are visible, but not always focusable. They are not announced to screen readers using tab, and can only be found if your users go looking for them.
- Disabling submit buttons in forms stops users from seeing error messages. Error messages save users time by helping users know where they have incorrectly filled in a form.
Buttons can go on different colored backgrounds, aim for a 3:1 contrast with button focus and their surrounding colors. More on color contrast.
Light backgrounds
- Use default Primary and Secondary on white, gray 100, gray 200
Inverse
- UsePrimary and Secondary on bright blue, dark blue, and gray 800
- Use buttons on backgrounds when their background to button focus contrast is lower than 3:1
- Overlay will appear above or below depending on position on the page
- Text will wrap