Version 5.0.0

Action button

Action buttons allow users to perform an action or mark a selection. They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.

Anatomy#


Image illustrating through labels the component parts of an action button within an action button group, including its icon, label, and hold icon.

Options#


Key example of an action button with an icon and a label Edit, and one with an icon without a label.

Label#

Action buttons should have a label whenever possible for accessibility. If a label isn’t present, it must include an icon and it becomes an icon-only action button.

Key example of an action button with an icon for Edit with a label, and one without an icon with only a text label Edit.

Icon#

An action button can have an optional icon. If a label isn’t used, it becomes icon-only and must include an icon. Icon-only action buttons are best for very simple actions and should always include tooltips on hover to provide more context for the icon.

Key examples of action buttons in the default style with a visible border and background, and examples of action buttons in quiet style without a visible background, one with the label Edit, one with both icon and the label Edit, and one with an icon only.

Quiet#

By default, action buttons have a visible background. This style works best in a dense array of controls where the background helps to separate action buttons from the surrounding container, or to give visibility to isolated buttons.

Alternatively, quiet action buttons can have no visible background until they’re interacted with. This style works best when a clear layout (vertical stack, table, grid) makes it easy to parse the buttons. Too many quiet components in a small space can be hard to read.

Key example showing an action button with an icon and label Edit in its default and selected state side-by-side, for both default and quiet styles.

Selected#

An action button can have a selected state to allow for toggling — not only for taking a direct action. This can be used to disclose parts of an interface, such as for showing or hiding panels.

Key example showing selected action buttons with and without emphasis, with an icon and the label Edit.

Emphasis#

By default, action buttons are not emphasized. This is optimal for when an action button is not the core part of an interface, such as in application panels, where all the visual components are monochrome in order to direct focus to the content.

The emphasized action button has a blue background for its selected state in order to provide a visual prominence that meets the accessible color contrast ratio. This is optimal for when the selection should call attention, such as within a tool bar.

Key example of an action button with a Pen tool icon with a hold icon (a small triangle in the bottom-right corner.)

Hold icon#

An action button can have a hold icon (a small corner triangle). This icon indicates that holding down the action button for a short amount of time can reveal a popover menu, which can be used, for example, to switch between related actions.

Key example of disabled action buttons in both default and quiet styles with an icon and label Edit.

Disabled#

An action 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.

Table of options#

From the design point of view, each component has a number of options. These options and their names are platform agnostic, and each implementation should adapt these to fit into their framework.

PropertyValuesDefault Value
label
text / nothing
When the label is not defined, the action button appears as icon-only.
icon
icon / nothing
Icon must be present if the label is not defined.
nothing
is quiet
yes / no
no
is selected
yes / no
no
is emphasized
yes / no
no
has hold icon
yes / no
no
is disabled
yes / no
no

Behaviors#


Key example of an action button with a very long label Präferenzen verwalten (German for manage preferences) being truncated at the end when the button container is not wide enough for the label, while still displaying the full label in a tooltip on mouse hover.

Text overflow#

When the action button text is too long for the available horizontal space, it truncates at the end. The full text should be revealed with a tooltip on hover.

Key example of 3 action buttons in an action button group, with icons and labels Properties, Info, and Keywords. The third action button does not fit in the horizontal space available, so it appears on a second line below the first two.

Action button group overflow#

When horizontal space is limited in an action button group, the individual action buttons wrap to form another line.

Usage guidelines#


Tooltips#

Icon-only action buttons can be hard to identify. Therefore, they should always show a tooltip displaying the name and possibly a keyboard shortcut after hovering for a short period of time.

Key examples showing correct usage of action buttons without visible labels. Two side-by-side action buttons, icons for Document and Settings, mouse hovered over Settings action button showing tooltip label Settings. Three action buttons stacked vertically, icons for Anchor point, Artboard, and Zoom, mouse hovered over Artboard action button showing tooltip label Artboard.

Isolated action buttons#

If you have an icon-only or text-only isolated action button, use the standard style to make sure it’s more easily identifiable as a button.

Key example showing correct usage of a single action button in default (non-quiet) style with label Copy link, next to a text field labeled File URL with a link inside.

When using a hold icon to switch actions, only group the actions that are part of the same family. Don't group unrelated actions just for the sake of saving space.

Key example showing a correct use of the hold icon to group similar actions. A selected action button within a vertical action button group with an icon for brush. Next to it, a popover menu opened for an additional option for Pencil, with Brush being the selected action shown by a checkmark.
Key example showing a incorrect use of the hold icon to group similar actions. A selected action button within a vertical action button group with an icon for pen tool. Next to it, a popover menu opened for additional options like rectangular marquee, gradient, and anchor point tools which are very different from the pen tool.

Respect hold icon placement#

In left-to-right interfaces, the hold icon is always in the bottom right corner of the action button. It's a symbolic indicator that shows that a popover menu will appear on hold. Don't change the placement of the hold icon based on the design of the interface.

Key example showing the correct placement of the hold icon. It is placed on the bottom right corner, even when the action button group is inside a bar panel on the far right side of the application frame.
Key example showing the incorrect placement of the hold icon, placed on the bottom left corner of an icon-only action button in a vertical action button group is inside a bar panel on the far right side of the application frame.

Internationalization#


Key example of a mirrored action button with icon on the right and label Edit in Arabic on the left. Three icon-only action buttons with the hold icon mirrored, placed in the bottom left-hand corner of the action button.

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 hold icon is placed on the left side of the icon.

Keyboard interactions#


KEYINTERACTION
TabTabbing into an action button group places the focus on the first tool action button. Subsequent tabs move the focus to the next action button, or leave the group if the focus is on the last action button.
Shift + TabMoves the focus to the previous action button, or leaves the action button group if the focus is already on the first action button.
Space or EnterExecutes the action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller.

Changelog#


DateNumberNotes
Feb 26, 20205.2.1
  • Updated border color to be more accessible
Aug 22, 20195.2.0
  • Added text overflow behavior
  • Added group overflow behavior
Aug 13, 20195.1.0
  • Added emphasis (“emphasized/not emphasized”)
  • Combined tool component with this component
Jul 31, 20195.0.1
  • Updated text to use sentence case
Apr 20, 20195.0.0
  • This component is now individually versioned (individual versions of existing components start at 5.0.0)
  • Added RTL (right-to-left) guidelines

Design checklist#


All interactive states

Includes all interactive states that are applicable (hover, down, focus, keyboard focus, disabled).

Multiple options

Includes relevant options (variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.)

All color themes

Works properly across all four color themes (lightest, light, dark, darkest).

All platform scales

Includes a desktop scale (UWP, macOS, web desktop) and a mobile scale (iOS, Android, web mobile).

Defined behaviors

Includes guidelines for layout (wrapping, truncation, overflow), animation, interactions, etc.

Usage guidelines

Includes a list of dos and don’ts that highlight best practices and common mistakes.

Accessible contrast

Follows WCAG 2.0 standards for contrast (AA).

Internationalization guidelines

Works properly across various locales and includes guidelines for bi-directionality (RTL).

Keyboard interactions

Follows WCAG 2.0 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions.

Design tokens

All design attributes (color, typography, layout, animation, etc.) are included in Spectrum DNA.

Generated UI kit

Includes a downloadable XD file that has been generated by code and shows multiple variations, states, color themes, and scales.

In Spectrum for Adobe XD plugin

Component is included in the Spectrum for Adobe XD plugin.