Icon button

v3.1.0

Icon buttons help direct and capture user action and intent. They are compact with no visible label.

  • Skin
  • CoreUI
  • React

Considerations

Recognizable

Icons used within icon buttons should be easily recognizable. Avoid ambiguous icons that could mean different things in the same context.

Distinct

Each icon button on a page should be distinct. Avoid using duplicate icon buttons for the same function on a single page, except for common actions like save or overflow.

Compact

Icon buttons are helpful in dense layouts like tables and dashboards. Their smaller footprint allows for more visible actions before collapsing into overflow buttons.

Anatomy

Image of a button’s anatomy. Number 1 is pointing to the icon. Number 2 is pointing to the container.
  1. Icon
  2. Container

Properties

Icon

Icons buttons are used to quickly identify available actions.

Common actions, like save or search, can omit titles and use the icon alone. View available icons in the Icon library.

Avoid using an icon alone when the meaning is ambiguous, unclear, or unfamiliar.

Six icon buttons for save, pin, thumb up, redo, edit, chat.

Background

Icon buttons need to remain visible against their background. There are onSecondary and onElevated fill variants that help maintain that subtle contrast against the background. Learn more about background colors on the Color tokens page.

A set of buttons placed on primary, secondary, and elevated backgrounds across light and dark modes. The buttons on secondary backgrounds still have their containers visible using the onSecondary token.

Size

Buttons are available in small, medium, and large sizes. Small and medium sizes are used the most across smaller screens.

The small size is primarily used in popover elements and placed over images on item tiles to provide visual balance and conserve space. However, the small size still aims for a 48x48px tap target.

A set of outlined and filled save icon buttons. Both contain large, medium, and small variants.

Toggled states

Buttons can swap icons based on data states. There are several icons within our library that have a “Filled” counterpart to indicate whether a state is toggled on. The “Outlined” version indicates it is toggled off.

Three sets of icon buttons with outlined and filled states including save, pin, thumb up.

Pending

Buttons can show a pending state for actions that take longer to respond. The loading spinner replaces all content within the button and disables further interaction of the button until loading is complete. The button does not transition to a disabled (grey) state during this time.

This can significantly impact the user experience and expected timeframe of your interaction. Work with your development team to reduce lag time between states to avoid these pending states.

A series of icon buttons with pending states between the outlined and filled states for save, pin, thumb up.

Behavior

Minimum tap targets

The recommended minimum accessibility tap target for buttons is 48x48.

Large, medium, and small buttons with a pink square highlighting a 48px touch target on each.

Tooltips

Icon buttons reveal the label in a tooltip on hover or long-press.

An icon button with a heart inside. A hand cursor hovers over it with a tooltip of “Favorite this item” appearing above.

Button group

A button group contains multiple buttons of related actions. A group can contain a single button type or a mix of CTA, destructive, link, and/or icon buttons.

Additional actions can be nested under an icon button at the end of a button group.

A button group made of a primary CTA button and an overflow icon button.

Pending delay

The pending state has a delay of 1000ms before the spinner appears to avoid unnecessary flickering of the spinner during quick responses.

While pending states are currently supported for icon buttons, we want to have as little latency for quick actions as possible. An end user should almost never see this state if the experience is properly optimizing for user interaction.

Graphic demonstrating the 1 second delay before a pending state appears. The icon button has a heart icon on tap and a timeline showing 1 second passing before the circular loading indicator appears and replaces the icon.

State

Buttons use interactive state layers for states. The available states are enabled, hover, pressed, focused, disabled, and pending. Learn more about the state layer color values in Color tokens.

A heart icon button shown across sizes in enabled, hover, pressed, focused, disabled, and pending states.

Best practices

Backgrounds

Don’t place an icon button on a Secondary background without using the color.background.onSecondary color token. If the background isn’t changed, the circle will disappear.

Three icon buttons with secondary backgrounds over a shape that has a secondary background. The circles are invisible.

Specs

Two sets of heart icons. The first set are large, medium, and small icon buttons with 48px pink boxes showing the tap targets. The second set are also large, medium, and small icon buttons. The large has a 48px button with a 24px icon. The medium has a 40px button with a 20px icon. The small has a 32px button with a 16px icon.

Change log

VersionDateNotes
3.1.0
Jul, 2023
  • Corrected “pending delay” latency from 100ms to 1000ms
  • Updated to eBay Evo
3.1.0
Mar, 2023
  • Updated “borderless” value to “text”
  • Converted Standalone Link component into Link button
  • Renamed “role” property into “type”
3.0.0
Dec, 2022
  • Added state-layer component to handle state logic
  • Removed hover and pressed state from button component after adding state-layer
  • Added borderless button variant
  • Staged update for split button (currently testing)
  • Cleaned up component property and value labels
  • Renamed “label” layer to “title”
  • Renamed “icon” layer to “leading-icon”
2.0.0
Jun, 2022
  • Updated to use new component properties feature
  • Updated tertiary button style to improve contrast and accessibility
  • Added 32px size for use in components
  • Updated 40px size label to md
  • Added 48px size icon button to match other buttons
  • Combined destructive and default buttons together as a “role” property
  • Updated interactive states to use new state-layer logic
1.6.0
Aug, 2021
  • Added B5 for hover states
  • Added R5 and R6 for destructive button hover and active states
  • Updated button component architecture to use variants
  • Added tertiary button option
  • Added icon button
  • Added destructive button with all hierarchy levels