Buttons allow users to take actions, and make choices, with a single tap. We use 3 types of button styles.
All buttons must contain a Text Label. Primary, Secondary and Text buttons use text labels, which describe the action that will occur if a user taps a button. If a text label is not used, an icon should be present to signify what the button does.
Using capitalized button text labels (for languages that have capitalization) is recommended to distinguish the text label from surrounding text. If a text button does not use capitalization for button text, find another characteristic to distinguish it such as color, size, or placement.
All layouts should contain a single Primary button. This consistency makes it clear that other buttons have less importance in the hierarchy. The Primary button commands the most attention. A page may show more than one button in a layout at a time.
A Primary (high-emphasis) button can be accompanied by Secondary (medium-emphasis) and Text (low-emphasis) buttons that perform less important actions. When using multiple buttons, ensure the available state of one button doesn’t look like the disabled state of another.
When a Secondary or Text button are displayed side by side with a Primary button, always ensure the Primary button is on the right side.
While FullBeauty Brands migrates to only use Design Systems, developers can use the .btn-ds
class to make sure that legacy button styles / CSS are not applied to button elements on non-migrated pages.
Primary - Contained Button
Usage
Primary buttons are high-emphasis, distinguished by their use of elevation and fill. They contain actions that are primary to the page or app.
Container
Button containers are filled with a solid color indicative of brand identity.
Icon
Leading icons can be placed next to text labels to both clarify an action and call attention to a button. Use icons that clearly communicate their meaning.
Development
Add the corresponding class name to the button to match the desired design.
<button class="btn btn-primary btn-lg btn-block">
Button Label
</button>
Large - Primary
Default - Primary
Small - Primary
Large - Hovered
Default - Hovered
Small - Hovered
Large - Focused
Default - Focused
Small - Focused
Large - Disabled
Default - Disabled
Small - Disabled
Leading Icon Large - Primary
Leading Icon Default - Primary
Leading Icon Small - Primary
Secondary - Outlined Button
Usage
Secondary buttons are medium-emphasis buttons. They contain actions that are important, but aren’t the primary action in the page or app.
Alternatives
Secondary buttons are a lower emphasis to Primary - (Contained Buttons), but a higher emphasis alternative to text buttons.
Container
Button containers are displayed by a stroke around a text label. In a resting state, outlined buttons should display containment with a stroke and no fill. A background color is shown on button hover.
Icon
Leading icons can be placed next to text labels to both clarify an action and call attention to a button. Use icons that clearly communicate their meaning.
States
Outlined buttons can be placed on top of a variety of backgrounds. Its container is transparent and until the button is interacted with, a color isn’t visible. Color contrast checking should be performed to ensure the proper ADA compliance guidelines are met. Refer to the button container fill colors and opacity values in the guidelines below.
Development
Add the corresponding class name to the button to match the desired design.
<button class="btn btn-outline-primary btn-lg btn-block">
Button Label
</button>
Large - Outline
Default - Outline
Small - Outline
Large - Hovered
Default - Hovered
Small - Hovered
Large - Focused
Default - Focused
Small - Focused
Large - Disabled
Default - Disabled
Small - Disabled
Interface Tags
Text button variations will be used for Interface elements such as SEO widgets.
Development
Add the corresponding class name to the button to match the desired design.
<button class="btn btn-tag btn-sm my-1 px-4">
Button Label
</button>
Default - Category Leading Icon
Default
Default - Close Icon
Hover State - Category Leading Icon
Hover State
Hover State - Close Icon
Focus State - Category Leading Icon
Focus State
Focus State - Close Icon
Inactive State - Category Leading Icon
Inactive State
Text Buttons
Usage
Text buttons are typically used for less-pronounced actions, including those located:
- In dialogs
- In alerts
- In cards
In cards, text buttons help maintain an emphasis on card content.
Placement
Text buttons are often embedded in contained components like cards and dialogs, in order to relate themselves to the component in which they appear. Because text buttons don’t have a container, they don’t distract from nearby content.
Icon
Leading icons can be placed next to text labels to both clarify an action and call attention to a button. Use icons that clearly communicate their meaning.
States
Text buttons can be placed in front of a variety of backgrounds. Until the button is interacted with, its container isn’t visible. To maintain accessibility, Material Design provides baseline opacity values for the color overlays used by states. A brand can adjust opacity values to suit its color scheme.
Destructive Text Buttons
If an alert button results in a destructive action, such as deleting content, set the Text Button’s style to Destructive. This uses a common pattern within mobile devices to alert the user they are about to execute a destructive action. Additionally, provide a Cancel button so people can safely opt out of the destructive action.
Development
Add the corresponding class name to the button to match the desired design.
<button class="btn btn-link btn-lg btn-block">
Button Label
</button>
Large - Text Button
Default - Text Button
Small - Text Button
Large - Hovered
Default - Hovered
Small - Hovered
Large - Focused
Default - Focused
Small - Focused
Large - Disabled
Default - Disabled
Small - Disabled
Large Danger
Default Danger
Small Danger
Large Danger - Hovered
Default Danger - Hovered
Small Danger - Hovered
Large Danger - Focused
Default Danger - Focused
Small Danger - Focused
Anchor Buttons
Visually represent button elements to look like html anchor elements or "Text Links".
Development
Add the .btn-anchor
class to the implementation of "Text Buttons" above.
<button class="btn btn-link btn-anchor">
Button Label
</button>
Default
Hover State
Focus State