Button
A button starts an action on the screen you are on, such as sending an offer or publishing a job. Its label says what will happen.
Kinds
When to use it
Use a button when the result happens on this screen, such as sending an offer or opening a dialog. When the result is another page, use a link.
Use an icon button where a familiar glyph says enough, a select to pick an option, and a switch to turn a setting on or off.
One primary action
A screen has one primary button, and so does each dialog or panel that opens over it. Other actions take quieter buttons.
In a row of actions the primary comes last, 8 px after the others. Table and list rows carry no primary button.
Anatomy and sizes
A button holds one line of label and at most one icon. A label that does not fit is rewritten, never wrapped or cut.
An icon before the label names the action, such as Plus in Add note. An icon after it says where the button leads: a chevron opens a menu.
| Variant | Small, 36 px | Medium, 44 px | Large, 48 px |
|---|---|---|---|
- Height
- 36, 44 and 48 px, and at least as wide
- Side padding
- 12, 16 and 20 px
- --space-3, --space-4, --space-5
- Label
- 13 or 14 px on 20 px, weight 500
- --type-caption, --type-nav
- Icon
- 16 px, 8 px from the label
- --space-2
- Corner radius
- 8 px
- --radius-lg
States
| Variant | Rest | Hover | Pressed | Focus | Disabled | Loading |
|---|---|---|---|---|---|---|
Loading and disabled
While an action runs, a spinner takes the place of the start icon, or of the label. The button keeps its width and focus and ignores presses.
Leave a button enabled when you can, and say on press what is missing. A disabled button stays in the tab order, with the reason beside it.
- Spinner
- 16 px, one turn per second
- Spinner delay
- 300 ms
- --duration-slow
- Disabled
- The button at 50 percent opacity
Destructive actions
Start a destructive action with a danger quiet button. The confirmation carries a danger button named with the verb of its question.
A danger button is never the default: Enter does not press it, and focus starts on Cancel. When the action can be undone, act at once and offer Undo.
Keyboard and touch
Tab reaches every button, a disabled one included, and Enter or Space presses it. On a menu button, the arrows open the menu at its first or last item.
On a touch screen, even a small button answers to a touch 44 px tall. Keep 8 px between neighbors.
Writing the label
Start with a verb, and add the object when the verb alone is vague: Send offer, Publish job. Keep to two or three words in sentence case.
A dialog that asks Delete the CV? ends in Delete CV and Cancel, not Yes and No.
Cancel stops a task and keeps nothing. Close dismisses what changed nothing, such as an error message.
Permitted and not permitted
Permitted
One primary button on each screen, dialog and panel
Delete CV inside its confirmation
Not permitted
Two primary buttons side by side
Neither reads as the next step
Submit, OK or Yes as a label
It does not say what happens
Quiet or outline over a picture
The label sinks into it