# Buttons [Buttons](https://m3.material.io/components/buttons) help people initiate actions, from sending an email, to sharing a document, to liking a post. There are five types of common buttons: elevated, filled, filled tonal, outlined, and text. ![The 5 types of common buttons](images/button/hero.png "Elevated, filled, filled tonal, outlined, and text buttons") * [Design article](https://m3.material.io/components/buttons) * API Documentation (*coming soon*) * [Source code](https://github.com/material-components/material-web/tree/master/button) ## Types 1. [Elevated button](#elevated-button) 1. [Filled button](#filled-button) 1. [Filled tonal button](#filled-tonal-button) 1. [Outlined button](#outlined-button) 1. [Text button](#text-button) ## Usage Buttons have label text that describes the action that will occur if a user taps a button. ![Accessibility text](images/button/usage.png "Optional caption text") ```html ``` ### Icon An icon may optionally be added to a button to help communicate the button's action and help draw attention. ![Accessibility text](images/button/usage-icon.png "Optional caption text") ```html ``` ## Accessibility Add an [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute to buttons whose labels need a more descriptive label. ```html ``` ## Elevated button [Elevated buttons](https://m3.material.io/components/buttons/guidelines#4e89da4d-a8fa-4e20-bb8d-b8a93eff3e3e) are essentially filled tonal buttons with a shadow. To prevent shadow creep, only use them when absolutely necessary, such as when the button requires visual separation from a patterned background. ![An elevated button](images/button/usage-elevated-button.png) ```html ``` ## Filled button [Filled buttons](https://m3.material.io/components/buttons/guidelines#9ecffdb3-ef29-47e7-8d5d-f78b404fcafe) have the most visual impact after the FAB, and should be used for important, final actions that complete a flow, like Save, Join now, or Confirm. ![A filled button](images/button/usage-filled-button.png) ```html ``` ## Filled tonal button A [filled tonal button](https://m3.material.io/components/buttons/guidelines#07a1577b-aaf5-4824-a698-03526421058b) is an alternative middle ground between filled and outlined buttons. They're useful in contexts where a lower-priority button requires slightly more emphasis than an outline would give, such as "Next" in an onboarding flow. ![A filled tonal button](images/button/usage-filled-tonal-button.png) ```html ``` ## Outlined button [Outlined buttons](https://m3.material.io/components/buttons/guidelines#3742b09f-c224-43e0-a83e-541bd29d0f05) are medium-emphasis buttons. They contain actions that are important, but aren’t the primary action in an app. ![An outlined button](images/button/usage-outlined-button.png) ```html ``` ## Text button [Text buttons](https://m3.material.io/components/buttons/guidelines#c9bcbc0b-ee05-45ad-8e80-e814ae919fbb) are used for the lowest priority actions, especially when presenting multiple options. ![A text button](images/button/usage-text-button.png) ```html ``` ## Theming Button supports [Material theming](../theming.md) and can be customized in terms of color, typography, and shape. ### Elevated button tokens Token | Default value --------------------------------------- | --------------------------- `--md-elevated-button-container-color` | `--md-sys-color-surface` `--md-elevated-button-container-shape` | `9999px` `--md-elevated-button-label-text-color` | `--md-sys-color-on-surface` `--md-elevated-button-label-text-type` | `500 0.875rem/1.25rem "Roboto"` * [All tokens](https://github.com/material-components/material-web/blob/master/tokens/_md-comp-elevated-button.scss) ### Elevated button example ![Image of an elevated button with a different theme applied](images/button/theming-elevated-button.png "Elevated button theming example.") ```html ``` ### Filled button tokens Token | Default value ------------------------------------- | --------------------------- `--md-filled-button-container-color` | `--md-sys-color-primary` `--md-filled-button-container-shape` | `9999px` `--md-filled-button-label-text-color` | `--md-sys-color-on-primary` `--md-filled-button-label-text-type` | `500 0.875rem/1.25rem "Roboto"` * [All tokens](https://github.com/material-components/material-web/blob/master/tokens/_md-comp-filled-button.scss) ### Filled button example ![Image of a filled button with a different theme applied](images/button/theming-filled-button.png "Filled button theming example.") ```html ``` ### Filled tonal button tokens Token | Default value ------------------------------------ | --------------------------------------- `--md-tonal-button-container-color` | `--md-sys-color-secondary-container` `--md-tonal-button-container-shape` | `9999px` `--md-tonal-button-label-text-color` | `--md-sys-color-on-secondary-container` `--md-tonal-button-label-text-type` | `500 0.875rem/1.25rem "Roboto"` * [All tokens](https://github.com/material-components/material-web/blob/master/tokens/_md-comp-filled-tonal-button.scss) ### Filled tonal button example ![Image of a filled tonal button with a different theme applied](images/button/theming-filled-tonal-button.png "Filled tonal button theming example.") ```html ``` ### Outlined button tokens Token | Default value --------------------------------------- | ------------------------ `--md-outlined-button-outline-color` | `--md-sys-color-outline` `--md-outlined-button-container-shape` | `9999px` `--md-outlined-button-label-text-color` | `--md-sys-color-primary` `--md-outlined-button-label-text-type` | `500 0.875rem/1.25rem "Roboto"` * [All tokens](https://github.com/material-components/material-web/blob/master/tokens/_md-comp-outlined-button.scss) ### Outlined button example ![Image of an outlined button with a different theme applied](images/button/theming-outlined-button.png "Outlined button theming example.") ```html ``` ### Text button tokens Token | Default value ----------------------------------- | ------------------------ `--md-text-button-label-text-color` | `--md-sys-color-primary` `--md-text-button-label-text-type` | `500 0.875rem/1.25rem "Roboto"` * [All tokens](https://github.com/material-components/material-web/blob/master/tokens/_md-comp-text-button.scss) ### Text button example ![Image of a text button with a different theme applied](images/button/theming-text-button.png "Text button theming example.") ```html ```