Buttons

Overview of purpose

Buttons enable actions or navigation between views. They come in multiple styles to support different levels of emphasis, and are commonly used to trigger actions or to guide progression through a flow.

Cross-platform differences

While buttons achieve the same result, there are intentional differences in the button component structures across mobile platforms. These differences are intended to align with native Android and iOS conventions, creating a more familiar platform experience for our users.

Android

There are four button types: button, icon button, floating action button (FAB), and extended FAB.

  • The button component is used for actions that include a text label and an optional icon. It can be placed anywhere within a layout
  • The icon button component is used for actions that only require an icon. It can be placed anywhere within a layout.
  • The floating action button (FAB) component is reserved for the most important action in a view. This is typically a simple action like selecting a file or activating the camera. It is most commonly placed at the bottom right corner of the screen and is elevated above all other content, persisting on scrolling views.
  • The extended FAB adds a text label next to the icon, which can give clarity for actions with less obvious icons. Like the FAB, the extended FAB is typically a simple action and is most commonly placed at the bottom right corner of the screen.

In addition to casting a shadow, the button component includes a gradient stroke. Together, they give the button a sense of dimensionality, as if it is being lit from above and sitting naturally on top of the content beneath it.

iOS

  • Both the button and icon button types are handled with a single component. iOS does not have an equivalent to the Android floating action button (FAB).
  • iOS buttons do not include dimensionality, but are planned to add it in a future release.

Anatomy

Buttons are made up of two to three parts: a container, text, and up to one icon.

Width

Buttons with text labels can have their widths set to hug their label contents or to fill their parent container. Do not apply custom widths to icon buttons, FABs, or extended FABs. When using fill, avoid extremely wide button widths, especially when screens scale to larger devices.

Shape

Icon buttons can have a circle (1:1 aspect ratio) or capsule (1:1.125 aspect ratio) shape. Capsule shapes help drive attention to a feature, and should be used thoughtfully to add visual emphasis to an icon button, especially when placed within a set.

Android component options

Property
Value
Default value
Description
Enabled
Boolean
True
Size
Small Medium Large
Medium
Style
Quiet Secondary Primary Accent Premium
Quiet
Show icon
Boolean
True
Text
String
—
—
—
Icon must be present if the label is not defined.

Enabled

A button in a disabled state shows that an action exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action may become available later. Android floating action buttons cannot be disabled.

Size

Choose between three sizes: small, medium, and large. When selecting a size for a button, consider its layout context. Small buttons work best in denser UI layouts with multiple actions, while large buttons are best suited for more spacious layouts with fewer actions. Regardless of a button’s visual size, a minimum accessible tap target of 48 dp × 48 dp should be maintained.

When using buttons or icon buttons, default to the medium size. When using FABs or extended FABs, default to using the large size.

Style

Choose between six style variants of button. From low attention to high attention, they are: quiet, secondary, negative, primary, accent, and premium. Each variant represents different levels of emphasis and function, helping designers establish clear visual hierarchy and guide users toward appropriate actions.

On Android, secondary, quiet, and negative styles are not available for the FAB or extended FAB components.

Premium buttons

The Premium button leverages a gradient as a way to draw user attention, create strong visual hierarchy, and bring delight into the system. Gradient buttons communicate strong emphasis and should be used for Premium use cases only.

Accent buttons

The accent button communicates strong emphasis and is reserved for actions that are essential to an experience. Use accent buttons sparingly in a single view, as these give extra prominence to important actions and are meant to establish a clear hierarchy.

Primary buttons

The primary button is for medium emphasis. Use it when the action requires less prominence, or if there are multiple primary actions of the same importance in the same view.

Secondary buttons

The secondary button is for low emphasis. It’s often paired with high emphasis button types to surface less prominent actions. This style variant is not available for FABs or extended FABs.

Quiet buttons

The quiet button is used for the lowest emphasis actions. It has no visible background until it is interacted with, and works best when a clear layout makes it easy to parse. This style variant is not available for FABs or extended FABs.

Negative buttons

The negative button is used for actions that can be destructive or have negative consequences if taken. Use it sparingly. This style variant is not available for icon buttons, FABs, or extended FABs.

Show icon

Use an icon only when necessary and when it has a strong association with the label text.

Text

Buttons should always have a label. They can have an optional icon, but it should not be used for decoration. unless they are only using an icon that is universally understood and accessible. They can have an optional icon, but it should not be used for decoration.

Icon

An optional leading icon can be used in buttons when additional clarity is required. The icon should be highly relevant to the action and never used just for decoration. In RTL layouts, the leading icon is on the right side of the text.

iOS component options

Size
Small / Medium / Large
Medium
Style
Action quiet / Action / Accent / Secondary outline / Premium / Negative
Quiet
State
Default / Hover - pressed / Disabled
Default
Show text
Boolean
True
Text
String
—
Show icon
Boolean
True
Icon
—
—
Icon must be present if the label is not defined.

Size

Choose between three sizes: small, medium, and large. When selecting a size for a button, consider its layout context. Small buttons work best in denser UI layouts with multiple actions, while large buttons are best suited for more spacious layouts with fewer actions.

Accessibility guidance: Regardless of a button’s visual size, a minimum accessible tap target of 44 pt × 44 pt should be maintained.

Style

Choose between six style variants of the button. From low attention to high attention, they are: action quiet, secondary outline, action, negative, accent, and premium. Each variant represents different levels of emphasis and function, helping designers establish clear visual hierarchy and guide users toward appropriate actions.

Premium buttons

The Premium button leverages a gradient as a way to draw user attention, create strong visual hierarchy, and bring delight into the system. Gradient buttons communicate strong emphasis and should be used for Premium use cases only.

Accent buttons

The accent button communicates strong emphasis and is reserved for actions that are essential to an experience.

Design guidance: Use accent buttons sparingly in a single view, as these give extra prominence to important actions and are meant to establish a clear hierarchy.

Action buttons

The action button is for medium emphasis. Use it when the action requires less prominence, or if there are multiple primary actions of the same importance in the same view.

Secondary outline buttons

The secondary outline button is for low emphasis. It’s often paired with high emphasis button types to surface less prominent actions. This style variant is not available for FABs or extended FABs.

Action quiet buttons

The action quiet button is used for the lowest emphasis actions. It has no visible background until it is interacted with, and works best when a clear layout makes it easy to parse. This style variant is not available for FABs or extended FABs.

Negative buttons

The negative button is used for actions that can be destructive or have negative consequences if taken. Use it sparingly. This style variant is not available for icon buttons, FABs, or extended FABs.

State

Choose between three state variants of the button: default, hover/pressed, and disabled.

Show text

The text can be hidden to create an icon-only action button. If the text is hidden, an icon is required.

Text

Action buttons should always have a label, unless they are only using an icon that is universally understood and accessible. They can have an optional icon, but it should not be used for decoration.

Show icon

Use an icon only when necessary and when it has a strong association with the label text.

Icon

An optional leading icon can be used in buttons when additional clarity is required. The icon should be highly relevant to the action and never used just for decoration. In RTL layouts, the leading icon is on the right side of the text.

States

Every button contains two states in Figma: enabled and disabled.

Behaviors

Text overflow

Labels that exceed the button’s available width wrap to as many additional lines as needed. If the button has an icon, the lines of text will be left aligned. Otherwise, the lines of text are centered in the button.

Presets

In addition to providing flexible button types, Spectrum also includes some preset buttons with all of the necessary configurations applied across design and code.

Icon buttons

The following are available in all sizes, in quiet and secondary styles:

Usage guidelines

Content and labeling

Do use clear, action-oriented labels that tell users exactly what will happen when tapped.

Labels should start with a verb and describe the specific outcome, not just restate the trigger.

Button placement

Do keep button order and placement consistent with platform conventions.

Grouping buttons

Do maintain clear hierarchy when grouping buttons

Whether stacked vertically or horizontally, button groupings should create clear action hierarchy.

Do use attention hierarchy to guide button selections within a layout

Button sizes and styles communicate levels of importance. Avoid using too many high attention buttons within a single layout

Destructive actions

Do reserve the negative style for irreversible actions

The negative style should only be used for irreversible actions like deleting an account or permanently removing data.

Don't pair a destructive button with a primary button

Do not pair destructive actions with Premium, Accent, or Primary buttons within the same group without a clear visual distinction between them. If both styles are competing for attention, users can lose track of which one is actually the safe choice.

Icon usage within buttons

Use an icon only when necessary and when it has a strong association with the label text. Never use an icon solely for decorative purposes.

Haptics & motion

Buttons support optional haptic feedback. Use haptics sparingly and thoughtfully, as they can lose meaning when applied too frequently.

On Android, buttons have a ripple effect on press. On iOS, Buttons scale down on press and scale back up on release. If a user’s device has reduced animations turned on, the end state of the animation is presented, but the animation itself is disabled.

Internationalization

RTL

For RTL (right-to-left) languages, the layout of the action button is mirrored. The icon is placed on the right side of the text and the close and action buttons are placed on the left side of the icon.

FABs

For RTL languages, the FAB should be placed at the bottom left corner of the screen.

Accessibility

Most accessibility behaviors are built in to the component to meet user preferences; including font scaling settings, bold text, reduced animations, TalkBack / VoiceOver compatibility, color contrast, and support for non-touch navigation modes.

Additionally, teams will need to:

  1. Accessibility labels
  1. Tap target size
  1. Consistent identification

Perceivable

Non-text content
1.1.1
A
Compliance
Info and relationships, identify purpose
1.3.1, 1.3.6
A, AAA
All functionality of the component is operable through an external keyboard without specific timing for keystrokes.
Text contrast
1.4.3
AA
Focus can be moved away from the component using only an external keyboard.
Non-text contrast
1.4.11
AA
Keyboard states use an indicator that is visible with at least 3:1 contrast.

Operable

Keyboard
2.1.1, 2.1.3
Level
Compliance
Keyboard
2.1.2
A, AAA
All functionality of the component is operable through an external keyboard without specific timing for keystrokes.
Keyboard traps
Boolean
A
Focus can be moved away from the component using only an external keyboard.
Seizures and physical reactions
2.3.1, 2.3.2, 2.3.3
A, AAA, AAA
There is no flashing content and motion or animation can be disabled through device “reduce motion” settings.
Focus order
2.4.3
A
Navigation sequences receive focus in an order that preserves meaning and operability.
Focus visible
2.4.7
AA
Keyboard states use an indicator that is visible with at least 3:1 contrast.