Usage guidelines
- Communicating an action that will occur.
- Triggering or enabling an action, such as submitting requested information.
- Progressing or regressing a user through a step in a flow.
- Directing users to a new page or different part within the same page.
- Limited space available. Consider using an IconButton instead.
Best practices
For general Button best practices, refer to the Button web documentation.
- Place primary buttons to the right or top of other buttons when in a button group.
- Keep elements inside a button container grouped. Label text and icons should remain centered when the Button width increases.
- Avoid using multiple button sizes in the same experience.
- If necessary, adjust the button placement and size when scaling from large screens to small screens.
Accessibility
People use Android's accessibility features, such as TalkBack and dynamic text sizing to personalize how they interact with their devices. Supporting these personalizations ensures that everyone has a great user experience. See Material Design and development documentation about accessibility for Android:
Accessible design on Android
Accessible development on Android
Design tokens
Anatomy
Variants
Size
Mobile buttons are available in 2 sizes. The Button text always use $font-size-300 token (16sp).
- lg (60dp)
Large should be primarily used on Pinner, business and internal surfaces. - sm (44dp)
Small should be used sparingly and only in places where the UI is very dense.
Width
- Inline (default)
Inline is our default button width. The width of an inline Button is based on the length of its text. Use in most cases where you need a Button. - Full-width (fullWidth)
Full-width Buttons can be used in narrower content areas when the text in the Button is close to full width in the content area.
Styling
For more information on color, icons, roles, and states, refer to the web Button documentation
- Red (Primary)
High emphasis, used for primary actions. - Blue (Primary in shopping context)
The blue Button is only intended for the shopping experience and is used for primary shopping actions. - Gray (Secondary)
Medium emphasis, used for secondary actions. - Transparent (Tertiary)
Low emphasis when placed on dark/image backgrounds, used for tertiary actions in that context. Note, this treatment should be used with caution as it has potential color contrast issues.
Primary
Shopping
Secondary
Tertiary
States
- Disabled
Used to block user interaction such as hover, focus and click. Disabled Buttons are completely unreachable by a keyboard and screenreader, so do not attach Tooltips to disabled Buttons. - Selected
When Button is used to toggle a boolean state or control the visibility of other elements (e.g. Dropdown).
Disabled
Selected
Color
Writing
For writing best practices, refer to the web Button documentation.
Localization
For RTL (right-to-left) languages, the layout of the button is mirrored.