Buttons
Cross-platform differences
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
Android component options
EnabledSizeSmall Medium LargeStyleQuiet Secondary Primary Accent PremiumShow iconTextIconShapeCircle CapsuleWidthFill HugEnabled
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, 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.
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.
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.
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.
iOS component options
EnabledSizeSmall Medium LargeStyleAction quiet Action Accent Secondary outline Premium NegativeIcon and text Icon only Text onlyTextIconWidthHug contents Fill containerTint Highlight LiftDefault Regular BoldSize
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.
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.
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.
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.
Behaviors
Text overflow
Extended FABs
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:
- 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.
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
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
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:
-
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.
-
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.
-
Consistent identification
Identify buttons that do the same thing consistently across the application.