All guides
ActionsPatterns6 min read

Which button?

A button's look is a promise about what it does and how much it matters. This guide decides which variant and size an action gets and where it sits; the style guide shows the components themselves.

If you only remember one rule

One primary per surface. What a button does sets its variant; where it sits sets its size. A surface is a page, drawer, modal or popover — and plenty of surfaces have no primary at all.

Why it matters

Emphasis only works while it's scarce.

The one that stands out gets seen

A filled button is noticed first because it's different from everything around it (the Von Restorff effect). Two of them cancel each other out.

Equal buttons slow people down

Every equally weighted choice adds decision time (Hick's law). Hierarchy tells people which one to consider first.

Size is about reach, not rank

A bigger target is quicker to hit (Fitts's law) — so size follows how much room a spot has, and the fill carries importance.

Five roles

Two emphasis levels for actions, one for dismissing, one for controls — and red for the point of no return.

variant="default"· changes data

The one action the surface exists for — Add Participant on a list, Publish on a draft, Save in a drawer.

variant="secondary"· changes data

Every other action — Edit, Add X in a card, Actions ▾, Upload, Connect, Approve.

variant="ghost"· changes nothing much

Cancel, Close, Show / Hide, Clear, icon-only row buttons, prev / next.

variant="outline"· changes the view

Filter, Save view, date triggers, pagination, +15 mins chips, Back — and everything in the app's top bar, New Task included, except Ask Astalty.

variant="ai"· changes opens ask astalty

New chat, the top bar's Ask Astalty, and Build with AI / Write with AI / Set up with Ask Astalty. Never a way to make another button stand out.

variant="destructive"· changes data, for good

The confirm button in a "Delete this?" dialog — and the destructive action in a selection bar.

variant="destructive-outline"· changes data, for good

A destructive action standing next to a bordered one — Cancel Support beside Update Details. Still only starts the flow.

Why keep the light outline?It isn't a third level of action. Its grey border is the same as a text input's, so it reads as part of the input family — perfect for Filter, a date picker or Next page, which change what you see, not what's saved. If a button changes data, it's secondary or ghost. gray and lg are retired.

Five questions

Walk them in order — the first question that gives a clear answer decides the variant.

  1. 1
    Does it confirm a destructive action inside a confirmation dialog?
    Destructive

    "Delete goal?" → the Delete button. The red fill is saved for the moment of no return — the Delete that opens the dialog is a red ghost.

  2. 2
    Does it dismiss, collapse, or is it an icon in a row?
    Ghost

    Cancel, Close, Show details, the ⋯ on a row, prev / next arrows. These are always there and rarely the point.

  3. 3
    Does it change what you're looking at, not what's saved?
    Outline

    Filter, date range, next page, Back. The grey border matches the search input beside it — it belongs to the input family, not the action family.

  4. 4
    Is it the single action this surface exists for — and nothing else here is primary?
    Primary

    Ask: if this page could only have one button, would it be this one? A list page's Add. A draft's Publish. A drawer's Save. Pages made of several cards, and record pages, usually answer no.

  5. 5
    Anything else?
    Secondary

    Edit, Add Address, Actions ▾, Upload, Approve, Read & Sign — an action that matters, but isn't the one.

Size follows position

A big button isn't a more important button. Size comes from the spot it sits in.

size="default" · 36px

Page headers, a list page's table card, drawer and modal footers, empty-state CTAs, form submit.

size="sm" · 28px

Card headers on pages that stack cards, the participant header band, toolbars, rails, drawer cards, popovers, row actions.

size="xs" · 24px

Inline with text — Add Plan beside the plan dates, Remind beside a name, +mins.

One page, three sizesdefault → sm → xs
Participants
Plan: 1 Jul 2026 – 30 Jun 2027

The page header gets a full-size primary. The toolbar packs its controls at sm, and the icon buttons match (icon-sm). The inline button shrinks to the text it sits beside. Every button in a row shares one size.

In action

The screens that prompted this guide, before and after.

Participant profile
Before
Participant header
Participant Details
Address
After
Participant header
Participant Details
Address

A record page has no single job, so it has no primary. Edit stays in both places on purpose — the header band folds away with Hide details but shows on every profile section, the card is always visible — so both copies match: secondary, small.

Directory tab
Before
Contacts
Service Providers
After
Contacts
Service Providers

Two cards doing the same job had three different Add buttons. Stacked cards are peers: same variant, same size, no primary.

Business settings
Before
Business Details
Business Address
After
Business Details
Business Address

Two primaries on one page means neither one is primary. Each card's Edit is a peer action.

Placement

Where the buttons go, and how many fit.

Header group — primary last[Actions ▾] [secondary…] [primary]
Code of Conduct · Draft v3

The eye ends on the primary. At most three buttons show; a fourth goes into Actions ▾.

Drawer footer[delete] … [Cancel] [Save]

Delete starts a flow, so it's a red ghost on the far left — away from Save. The confirmation dialog it opens is where the filled destructive button lives.

Destructive beside a bordered action[Cancel Support] [Update Details]

The exception to the red ghost. With a bordered neighbour, a borderless red reads as unfinished rather than quiet, so it takes destructive-outline and the pair balances. It still only starts the flow — the soft fill stays on the confirm.

Rowsvariant="secondary" size="sm"
Code of Conduct
Privacy Policy

A button repeated on every row can't be “the one”, so rows are never primary.

In this app

Real actions, and what they get.

ActionWhereButtonWhy
Add ParticipantParticipants listPrimary · defaultThe list exists to add to
EditParticipant header band + Details cardSecondary · sm (both)Record page — no primary; header folds away
Add ContactDirectory tab, Contacts cardSecondary · smStacked cards
EditBusiness settings cardsSecondary · smStacked cards
Actions ▾Any headerSecondaryHolds actions, sits left of them
Publish v3Draft policy headerPrimary · defaultThe draft exists to publish
Read & SignMy Policies rowsSecondary · smRows are never primary
FilterTable toolbarsOutline · smChanges the view
New TaskApp top barOutline · smTop-bar chrome — on every page, stays quiet
Ask AstaltyApp top barAsk Astalty (ai) · smChrome exception — the logo's gradient edge marks the way into Ask Astalty
Subscribe NowApp top bar, on a trialIts own pill, brand borderChrome exception — it has a deadline and leaves with the trial
Build with AIForm builderAsk Astalty (ai) · smOpens a docked Ask Astalty chat
CancelEvery drawer and modalGhost · defaultDismisses
DeleteDrawer footer, leftGhost, red textStarts a destructive flow
DeactivateSelection barDestructive · smNo primary on the bar, and a ghost red gets lost on its tint
DeleteConfirmation dialogDestructiveThe point of no return

Naming the action

Ruled (FB, 2026-10-26, DES-51).

Add: a record

Something you enter from facts you already have.

New: a thing you author

Something you write or the system assembles for you.

  • Production mixes three verbs — New Register and New Feedback beside Create Site and Add Participant. Settings list entries (cost codes, leave types, pay groups) are records: Add.
  • The overlay's title repeats the button. Its primary says what pressing it does: Add Payment saves with Add Payment; New Form saves with Create Form. Create appears nowhere else.
  • A confirm button names what happens — Mark All as Read, Accept Terms — never Confirm, OK or Submit.

Icons after the label

Ruled — DES-52. Every size on /style-guide#trailing-icons.

  • A trailing icon (↗, ▾, →) is one size smaller than the leading icon, still centred: 14px regular, 12px small, 10px extra-small. At the leading icon's size it fills the capital height and reads heavy. The kit does this; don't size it yourself.
  • Text links take the same step with icon-trailing: 1em of the text, centred.
  • Anything that leaves the app — a new tab, Xero, the user guide — uses SquareArrowOutUpRight, never ExternalLink or ArrowUpRight. The bare ArrowUpRight stays for going to another page inside the app, except in a menu, where a paler bare ↗ after the label leaves it.
  • One icon per button: keep the one that says what happens (▾, ↗) — “Export ▾”, not “⬇ Export ▾”, and “Help Center ↗”, not “? Help Center ↗”. The new-tab icon always trails.
  • Two places keep the leading icon. The top bar's chrome takes no ↗: User Guide keeps its book and says “opens in a new tab” in its tooltip and name. A menu item keeps its icon for the column and takes a paler bare ↗ right after its label, as in “Training ↗”.

Do / Don't

Do
  • Give each page, drawer, modal and popover at most one primary
  • Let a page have no primary when no single action is the point of it
  • Use outline only for controls that change the view
  • Size a button by where it sits — every button in a row shares one size
  • Put the primary last in its group, Actions ▾ first
  • Move a fourth header button into Actions ▾
  • Keep a header band's actions out of the fold when the page repeats them nowhere else
Don't
  • Don't make a button primary because it's important — only because it's the one
  • Don't repeat an action on a surface — unless one copy can fold away or the other lives in a header shared across sections
  • Don't put the only copy of an action somewhere that collapses — repeat it, or keep it out of the fold
  • Don't style two copies of the same action differently
  • Don't use outline as a quieter secondary
  • Don't put a primary on every row
  • Don't override a button's height with a class — pick the size
  • Don't hand-roll a <button> that looks like a Button

Sources

The framework distils published guidance — worth reading in full when a case doesn't fit neatly.

Agents get the same rules in condensed form: apps/next/docs/ux-guides/button-hierarchy.md — keep both in sync when the framework changes.