CTA button

3.1.0

CTA buttons present the primary actions within a flow to help guide users through experiences.

  • Skin
  • CoreUI
  • React

Considerations

Hierarchy

Buttons communicate the importance of the actions on a screen.

Consistent

Buttons appear in consistent places throughout the experience.

Clear

Labels are short and express the action that will occur when pressed.

Anatomy

A button’s anatomy. Number 1 is pointing to the leading icon element. Number 2 is pointing to the title element. Number 3 is pointing to the trailing icon. Number 4 is pointing to the container.
  1. Lead icon
  2. Title
  3. Trailing icon
  4. Container

Style properties

Primary

Primary buttons represent the most important action on a page. They guide users to the next step in completing a task. There should only be a single primary action per screen.

A primary level button in context pinned to the bottom of a screen with the title of “List it”.

Secondary

Secondary buttons have less visual weight and are used for non-primary actions. Avoid using them in isolation or as primary positive actions that progress an experience.

Secondary level buttons in context in a seller description section.

Tertiary

Tertiary buttons are for low-priority actions. They can be used in isolation or paired with a primary button for increased contrast. These actions usually supplement a primary task.

Tertiary level buttons in context within an item tile with the title “Buy it now”.

Borderless

Borderless buttons represent lower-priority actions. They are used within other components as optional actions or within button groups.

A borderless button in context in the footer of a fullscreen date picker with a title of “Cancel”.

Role properties

Default

Use default buttons for routine, safe actions. They are used for tasks like "Accept," "Save," "Next," or "Cancel." These buttons are suitable for non-critical operations that do not lead to significant changes or data loss, ensuring a smooth user experience for regular interactions.

Three buttons with the default role. The default buttons have a title of “Accept” and the destructive buttons have a title of “Remove”.

Destructive

Use destructive buttons when an action will remove user data. Higher-impact decisions should use the bolder primary style while less-impactful decisions can use the secondary or tertiary styles.

Three buttons with the destructive role. The destructive buttons have a title of “Remove”.

Additional properties

Button title

Titles use a verb + noun structure to describe what the button will do when pressed.

Three buttons with different titles. One is titled “Add to watchlist”, another is titled “Remove from watchlist”, and “Revise listing”.

Icons

There are two icon slots available, a leading and a trailing icon. Use lead icons alongside titles to visually reinforce their meaning and draw attention.

Use trailing icons for disclosure of additional behavior, like a chevron indicating a popover menu will appear when the button is pressed.

Two buttons with the title “Download” exemplifying the use of an icon or not. The button on the left has an icon in the lead position while the button on the right omits the icon.

Size

Buttons are available in small, medium, and large sizes. Large is the default size and is preferred on smaller screens.

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

A large, medium, and small button showing the available sizes.

Width

Buttons can span the width of their container or fit to their contents. For either option, buttons adhere to their minimum and maximum widths.

Two buttons titled “Add to cart” with two different widths applied. One is set to hug the title while the other is set to fill its parent container.

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 (gray) state during this time.

Two buttons, one primary and one secondary, in a pending state showing a circular loading indicator replacing the title.

Behavior

Minimum width

The minimum width for basic and destructive buttons is 2x the height of the button.

Split buttons have a minimum width of 4x the height of the button.

A large button at its minimum suggested width of its height multiplied by 2.

Maximum width

The maximum width for buttons is 10x the height of the button.

A large and a small button at their maximum width of their height multiplied by 10.

Minimum tap targets

The recommended minimum tap target for buttons is 48x48.

A button at all three sizes overlayed with a pink box indicating the tap area. The tap area is the same height as the large button, but extends beyond the height of the medium and small buttons.

Text overflow

Titles that extend beyond the width of the button container will wrap to a new line to ensure the title remains visible for all languages.

A button title in German wrapping to a second line due to the button being too narrow for the title to fit on a single line.

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 icon buttons.

Use a button group when nesting additional actions in an overflow icon button.

A button title in German wrapping to a second line due to the button being too narrow for the title to fit on a single line.

Pending delay

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

Graphic demonstrating the 1 second delay before a pending state appears. The button has a title of “Apply” on tap and a timeline showing 1 second passing before the circular loading indicator appears and replaces the title.

State

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

Each button level at each of their states. The states shown are enabled, hover, pressed, focused, disabled, and pending.

Best practices

Hierarchy

Only use 1 primary button per screen. Use secondary, tertiary, or text buttons for other actions.

Three buttons properly applying priority levels with only one primary level button present.

Avoid more than one primary button on the screen as it reduces the clarity of what should be done next.

Three buttons improperly applying a primary level to two button in the same button group.

Label content

Labels should use verbs and indicate what will happen when the button is pressed.

Two buttons with proper titles that are verbs indicating an action being taken. One buttons has a title of “Agree” and the other is “Update details”.

Don’t use adjectives, nouns, or past tense in labels.

Two buttons with improper titles. One button’s title is “Yes” and the other is “Done”.

Icons

Use icons when it helps clarify an action.

Two buttons properly using icons. One button doesn’t have an icon with the title “Add to cart” and the other button has an outline heart icon with the title “Add to watchlist”.

Avoid overusing icons in buttons for decorative purposes. This adds unnecessary noise to the UI.

Two buttons improperly using icons. One button has a cart icon with the title “Add to cart” and the other has a heart icon with the title “Add to watchlist”.

Do use a single icon in the leading or trailing position.

A button with a single lead icon representing an upload action.

Don’t use both leading and trailing icons in the same button.

A button improperly showing a lead and trailing icon in the same button.

Pending state

The pending state only replaces the content within the button.

A button in a pending state with the proper treatment of the background fill.

Don’t override the button color when pending. This is unnecessary and renders the content visually inaccessible.

A button in a pending state with the button fill improperly appearing like a disabled state.

Specs

Measurements of each button size and its contents. 
Large buttons are 48px tall with 24px of horizontal padding. There is an 8px gap between the icon and title when the icon is present.
Medium buttons are 40px tall with 20px of horizontal padding. There is an 8px gap between the icon and title when the icon is present.
Small buttons are 32px tall with 16px of horizontal padding. There is an 6px gap between the icon and title when the icon is present.
The circular loading indicator in the pending state is 24px by 24px in large and medium buttons and 16px by 16px in small buttons.

Change log

VersionDateNotes
3.1.0
Jul, 2024
  • 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