Buttons

Cross-platform differences

Side-by-side comparison of Spectrum Android’s four button types (Button, Icon button, Extended FAB, FAB) and Spectrum iOS’s single Button type, shown as blue pill and circle shapes with placeholder "Label" text and dashed icon glyphs.
While buttons achieve the same result, there are intentional differences in the button component structures across mobile platforms. We designed these differences 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.

  • Use the button component for actions that include a text label and an optional icon. You can place it anywhere within a layout.
  • Use the icon button component for actions that only require an icon. You can place it anywhere within a layout.
  • Use the floating action button (FAB) component only 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.
  • Use the extended FAB to add a text label next to an optional FAB icon, which gives 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 FABs casting a shadow, all button components include 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 a separate FAB component, but an icon button can be used in its place.
  • iOS buttons do not include dimensionality, but we plan to add it in a future release.

Anatomy

A blue pill-shaped button reading "Label" with a dashed icon placeholder to its left. Three callout labels connect to it: "semantic icon" pointing to the icon, "text label" pointing to the text, and "container" pointing to the button shape itself.

Android component options

Property
Value
Description
Enabled
Boolean
Size
Small Medium Large
Style
Quiet Secondary Primary Accent Premium
Show icon
Boolean
Text
String
Icon
—
Icon must be present if the label is not defined.
Shape
Circle Capsule
Applies to Android icon button only.
Width
Fill Hug

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.

Two buttons side by side, a blue "Label" button marked Enabled and a grayed-out "Label" button marked 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, maintain a minimum accessible tap target of 48 dp × 48 dp. When using buttons or icon buttons, default to the medium size. When using FABs or extended FABs, default to using the large size.

Three blue "Label" buttons of increasing size, labeled Small, Medium, and Large from left to right.

Style

Choose from six button styles. 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

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

The accent button communicates strong emphasis. Reserve the accent button 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

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

The secondary button is for low emphasis. Pair it with high emphasis button types to surface less prominent actions. This style variant is not available for FABs or extended FABs.

Quiet

Use the quiet button 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

Use the negative button 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.

Six button variants split into two groups. Low attention buttons: Quiet (text only), Secondary (gray), and Negative (light gray with red text). High attention buttons: Primary (black), Accent (blue), and Premium (purple gradient). An arrow beneath spans from "Lower attention" to "Higher attention.”

Show icon

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

Text

Text buttons should always have a label. They can have an optional icon, but it should be universally understood and not used for decoration. Use an icon button instead if the icon is universally understood and a label is not desired.

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.

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. Use them to thoughtfully add visual emphasis to an icon button, especially when placed within a set.

Two blue icon buttons side by side, labeled "Circle" and "Capsule," showing the difference between the two aspect ratios.

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.

Two promotional cards labeled "Hug contents" and "Fill container," each showing a landscape photo, the heading "Create without limits," body text "Your ideas, brought to life with AI. Generate & refine in seconds," and an "Explore now" button with a sparkle icon. In the first card, the button is narrower than the available space; in the second, the button spans the full width of the card.

iOS component options

Property
Value
Description
Enabled
Boolean
Size
Small Medium Large
Style
Action quiet Action Accent Secondary outline Premium Negative
Label style
Icon and text Icon only Text only
Text
String
Icon
—
Icon must be present if the label is not defined.
Width
Hug contents Fill container
Hover effect
Tint Highlight Lift
Text weight
Default Regular Bold
Haptics
Boolean

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 44 pt × 44 pt should be maintained.

Three blue "Label" buttons of increasing size, labeled Small, Medium, and Large from left to right.

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

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. Use them for Premium use cases only.

Accent

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.

Action

Use the action button 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

Use the secondary outline button for low emphasis. Pair it with high-emphasis button types to surface less prominent actions.

Action quiet

Use the action quiet button 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.

Negative

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

Six button variants split into two groups. Low attention buttons: Action quiet (text only), Secondary outline (outlined), Action (gray), and Negative (red text). High attention buttons: Accent (blue) and Premium (purple gradient). An arrow beneath spans from "Lower attention" to "Higher attention.”

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.

Two promotional cards labeled "Hug contents" and "Fill container," each showing a landscape photo, the heading "Create without limits," body text "Your ideas, brought to life with AI. Generate & refine in seconds," and a blue "Explore now" button with a sparkle icon. In the first card, the button is narrower than the available space; in the second, the button spans the full width of the card.

State

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

Three blue "Label" buttons showing Default, Hover/pressed, and Disabled states, with the disabled version grayed out.

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.

Behaviors

Text overflow

Two blue buttons with three lines of wrapped placeholder text, one labeled "Wrapping button with icon" (text left-aligned) and one labeled "Wrapping button without icon" (text centered).
Labels that exceed the button’s available width wrap to as many additional lines as needed. With an icon, text aligns left. Without one, it centers. While buttons can wrap longer labels, keep labels concise whenever possible to maintain a clean, balanced layout.

Extended FABs

Two mobile screens labeled "Not scrolled" and "Scrolled," comparing extended FAB behavior. In the first, an extended FAB reading "Upload photo" with a cloud upload icon floats over a photo grid, above the "Editorial" section heading. In the second, the same button has collapsed to an icon-only FAB, showing just the cloud upload icon, positioned over a second row of photos further down the page.
When a screen contains an extended FAB with a leading icon, teams can optionally have it collapse to an icon-only FAB as the user scrolls, hiding the text label and keeping just the icon visible. This keeps the button from taking up unnecessary space or covering more content than it needs to once the user is deeper into a scrolling view. When the user scrolls back up, the FAB can expand again to show the full label. Extended FABs without leading icons cannot expand/collapse on scroll.

Presets

A row of paired icon buttons in quiet and secondary styles for Close, Help, Info, Done, Cancel, and More, with an additional "iOS only" row showing Add and AI assistant icon buttons.

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:

  • Add (iOS only)
  • AI assistant (iOS only)
  • Cancel
  • Close
  • Done
  • Help
  • Info
  • More

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.

  • Use verb-first, specific labels like “Save changes” or “Delete account” instead of vague ones like “OK” or“Submit.”
  • Keep labels short enough to avoid wrapping at standard button widths, ideally one to three words.
  • Don’t use punctuation in labels unless it’s functionally necessary, like “Continue…” to indicate a follow-up step.
  • Match the label’s tone to the action’s weight. Don’t soften a destructive action with casual phrasing, and don’t make a low-stakes action sound overly formal.
  • Don’t repeat the screen’s title or heading in the button label. If the heading already says “Delete photo,” the button can just say “Delete.”

Button placement

Do keep button order and placement consistent with platform conventions

Place the primary or confirming action on the trailing side (right side on LTR layouts), with cancel or dismiss to the leading side.

A light gray "Cancel" button next to a black "Save photo" button, shown as the correct trailing-action placement.

Grouping buttons

Do maintain clear hierarchy when grouping buttons

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

Don’t group more than two button styles.
Three buttons grouped together, gray "Cancel," black "Save photo," and purple gradient "Save to cloud," flagged as a "Do not" example for using more than two button styles.
On Android, pair premium, accent, and primary buttons with secondary or quiet buttons. On iOS, pair premium and accent buttons with action, secondary outline, and quiet buttons.
Two side-by-side columns (Android and iOS) each showing six rows of "Cancel" paired with "Save photo" across different style and emphasis combinations, illustrating acceptable pairings.
Don’t pair premium and accent buttons with each other.
A blue "Cancel" button next to a purple gradient "Save photo" button, marked as a "Do not" example for pairing Premium and Accent styles together.
Secondary buttons can be paired with quiet buttons.
A plain text "Cancel" button (no visible background, quiet style) next to a gray filled pill "Save photo" button (secondary style), marked "Do example," showing that secondary and quiet styles can be paired together.
In cases where button pairings need to have equal hierarchy (such as multiple sign-in options), use secondary or quiet button styles only.
Two gray secondary-style buttons, "Sign in with SSO" and "Sign in with email," stacked vertically, with a text-only quiet-style version of the same two options shown below a divider line.

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

Only use the negative style for irreversible actions like deleting an account or permanently removing data.
A light gray button with red "Delete photo" text, marked "Do," used for an irreversible action.
Do not use the negative style for cancel buttons.
A light gray button with red "Cancel" text, showing the negative style misapplied to a non-destructive action.

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 and motion

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

Android

Buttons have a ripple effect while scaling down on press and back up on release.

iOS

Buttons only have the scaling animation. 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

Two mobile screens comparing an extended FAB button in left-to-right and right-to-left layouts. In the left-to-right version, a blue pill-shaped button reads "Upload photo" with a cloud upload icon on the leading (left) side of the text. In the right-to-left version, the same button displays Hebrew text ("העלאת תמונה") with the cloud upload icon mirrored to the leading side, now on the right. Both screens show a photo grid above and a bottom navigation bar with Home, Projects, and Learn tabs.

Buttons

For RTL (right-to-left) languages, mirror the button’s layout: place the icon on the right and the label on the left.

FABs

For RTL languages, place the FAB at the bottom left corner of the screen.

Accessibility

Most accessibility behaviors are built into 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

    Provide an accessibility label for icon-only button types that describes the action that the button performs. Accessibility labels are not needed for buttons that also contain text.

  2. Tap target size

    Maintain a minimum tap target area of 48 dp × 48 dp on Android or 44 pt × 44 pt on iOS when laying out buttons, even if their visual size is smaller.

  3. Consistent identification

    Identify buttons that do the same thing consistently across the application.

Perceivable

Requirement
Criterion
Level
Compliance
Non-text content
1.1.1
A
Non‑text elements—such as icons used in action buttons—must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, need an accessible name so screen readers can announce their function.
Info and relationships, identify purpose
1.3.1, 1.3.6
A, AAA
Action buttons should be understandable by assistive technologies like screen readers.
Text contrast
1.4.3
AA
Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement.
Non-text contrast
1.4.11
AA
The visual presentation of icons and various states has a contrast ratio of at least 3:1.

Operable

Requirement
Criterion
Level
Compliance
Keyboard
2.1.1, 2.1.3
A, AAA
All functionality of the component is operable through an external keyboard without specific timing for keystrokes.
Keyboard traps
2.1.2
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.

Resources