#Overview

Buttons are the primary interaction element on our interfaces and come in different styles and sizes.

There are three types of buttons:

overview
  1. Button (40px height) with or without an icon
  2. Small button (24px height) with or without an icon
  3. Icon button

#When to use

  • To allow the user to request an action from the system, such as adding an item to cart or saving a form

#Don’t use for

  • Navigation in and between pages (use a Link)

#Anatomy

When an icon is used in a button, it follows the text behavior.

#Button

anatomy-button
  1. Desktop: Button, button with icon
  2. Desktop: Button small, button small with icon
  3. Mobile button: usually fixed at 100% content width (there can be exceptions - see “Placement: Mobile width and order” below.)

#Icon button

anatomy-iconbutton
  1. Desktop icon button
  2. Mobile icon button

#Minimum touch target

On mobile devices, the minimum width and height for touch targets in buttons is 40px. 48px is preferred.

touch-target

#Best practices

#Buttons do things, links go places

Do

A button performs an action in the system.

do-buttons

Don't

Don’t use buttons for navigation in or between pages. Use a link for this.

dont-links

#Keep it clean

Do

Keep the interface focused and straightforward. Ideally only one primary button should be visible at any one time.

do-clean

Don't

Avoid too many buttons on a page. It can degrade the website experience and overwhelm the user.

dont-clean

#Avoid disabled buttons

Do

Instead of a disabled button, show an error to explain to the user why they cannot proceed.

do-error

Don't

Avoid using disabled buttons because they leave the user to figure out what they should do to enable them again.

dont-disabled

#If you really need to use a disabled button...

Do

If a disabled button is required, include a tooltip to explain to why it cannot be clicked.

do-tooltip

Don't

Without an explanation, the user does not know why the button is disabled.

dont-no-tooltip

#States

#Primary button

Galaxus

states-primary-galaxus

Digitec

states-primary-digitec
  1. Normal
  2. Hover
  3. Focus
  4. Focus-visible
  5. Active
  6. Disabled

#Standard button

Galaxus

states-secondary-galaxus

Digitec

states-secondary-digitec
  1. Normal
  2. Hover
  3. Focus
  4. Focus-visible
  5. Active
  6. Disabled

#Icon button

Galaxus

states-iconbutton-galaxus

Digitec

states-iconbutton-digitec
  1. Normal
  2. Hover
  3. Focus
  4. Focus-visible
  5. Active
  6. Disabled

#Placement

#Mobile width and order

Since the space on a smartphone is smaller, buttons are almost always displayed using the full width of the display. There are are exceptions for half-width buttons. If more than one button is needed they are grouped and aligned vertically.

Do

Buttons on top of each other can be understood quickly.

do-stacked

Do

When possible, ONE primary action should be highlighted.

do-primary-action

Do

Buttons can be half-width. This structure helps emphasise the main action.

do-half-width

Don't

Different widths are difficult to read.

dont-widths

#Buttons in forms and dialogs

Buttons are always aligned on the right-hand side. If there are several buttons, they are grouped on the horizontal or vertical axis. The reading flow is taken into account and the desired action is displayed first.

Do

The most important action comes first. The "Cancel" action is always regarded as less important for ordering.

pop-up

Don't

Don’t place the “Cancel” action first.

pop-up-dont

Do

Group buttons to make them more comprehensible.

pop-up

Don't

The visual separation of the buttons makes it more difficult for the user to quickly grasp the content.

pop-up-dont

#Buttons in tables

Buttons in tables follow the same rules for order and position as in forms and dialogs.

Block

Do

As few buttons as possible should be used in tables. Often the most important functions can be represented as icons.

do-buttons-icons

Don't

Avoid too many buttons in a table.

dont-buttons