Skip to content
UX Atlas
ComponentCraft conventionFoundational

Button

Triggers an action. If it navigates somewhere, it should be a link instead.

Definition

A button performs an action in the current context. The distinction from a link is not visual: buttons act, links navigate. Getting this wrong breaks keyboard behaviour, middle-click, open-in-new-tab and screen reader announcements.

Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.

On this page
  1. Definition
  2. Variants and what each means
  3. Specify every state
  4. Continue from here

Variants and what each means

VariantMeaningCount per view
PrimaryThe expected next actionOne.
SecondaryA real alternativeOne or two.
Tertiary or ghostLow-emphasis actionsAs needed.
DestructiveRemoves or destroysVisually distinct from primary, never the default focus.
Link-styled buttonAn action that must sit inside textUse sparingly. Behaviour still has to be a button.

Specify every state

  • Rest, hover, focus visible, active, disabled, loading, and each of those per variant.
  • Loading state must prevent double submission and keep the button's width stable so the layout does not jump.
  • Minimum target 24 by 24 CSS pixels for WCAG 2.2 AA, with 44 by 44 preferred on touch.
  • The accessible name comes from the visible label. Icon-only buttons need aria-label and a tooltip.
  • Never disable a submit button as the only way of communicating an incomplete form.

Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.

Principles behind this

The reasoning this solution is an application of.

Depends on

Get these right first, or this one will not hold.

Often used with

These usually appear in the same screen or the same decision.

Related concept

Connected closely enough to change how you apply this.