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.
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.
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.
Every equally weighted choice adds decision time (Hick's law). Hierarchy tells people which one to consider first.
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 dataThe one action the surface exists for — Add Participant on a list, Publish on a draft, Save in a drawer.
variant="secondary"· changes dataEvery other action — Edit, Add X in a card, Actions ▾, Upload, Connect, Approve.
variant="ghost"· changes nothing muchCancel, Close, Show / Hide, Clear, icon-only row buttons, prev / next.
variant="outline"· changes the viewFilter, 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 astaltyNew 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 goodThe confirm button in a "Delete this?" dialog — and the destructive action in a selection bar.
variant="destructive-outline"· changes data, for goodA 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.
- 1Does 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.
- 2Does 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.
- 3Does 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.
- 4Is 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.
- 5Anything 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" · 36pxPage headers, a list page's table card, drawer and modal footers, empty-state CTAs, form submit.
size="sm" · 28pxCard headers on pages that stack cards, the participant header band, toolbars, rails, drawer cards, popovers, row actions.
size="xs" · 24pxInline with text — Add Plan beside the plan dates, Remind beside a name, +mins.
default → sm → xsThe 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.
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.
Two cards doing the same job had three different Add buttons. Stacked cards are peers: same variant, same size, no primary.
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.
[Actions ▾] [secondary…] [primary]The eye ends on the primary. At most three buttons show; a fourth goes into Actions ▾.
[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.
[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.
variant="secondary" size="sm"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.
| Action | Where | Button | Why |
|---|---|---|---|
| Add Participant | Participants list | Primary · default | The list exists to add to |
| Edit | Participant header band + Details card | Secondary · sm (both) | Record page — no primary; header folds away |
| Add Contact | Directory tab, Contacts card | Secondary · sm | Stacked cards |
| Edit | Business settings cards | Secondary · sm | Stacked cards |
| Actions ▾ | Any header | Secondary | Holds actions, sits left of them |
| Publish v3 | Draft policy header | Primary · default | The draft exists to publish |
| Read & Sign | My Policies rows | Secondary · sm | Rows are never primary |
| Filter | Table toolbars | Outline · sm | Changes the view |
| New Task | App top bar | Outline · sm | Top-bar chrome — on every page, stays quiet |
| Ask Astalty | App top bar | Ask Astalty (ai) · sm | Chrome exception — the logo's gradient edge marks the way into Ask Astalty |
| Subscribe Now | App top bar, on a trial | Its own pill, brand border | Chrome exception — it has a deadline and leaves with the trial |
| Build with AI | Form builder | Ask Astalty (ai) · sm | Opens a docked Ask Astalty chat |
| Cancel | Every drawer and modal | Ghost · default | Dismisses |
| Delete | Drawer footer, left | Ghost, red text | Starts a destructive flow |
| Deactivate | Selection bar | Destructive · sm | No primary on the bar, and a ghost red gets lost on its tint |
| Delete | Confirmation dialog | Destructive | The 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
- 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 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.
- Nielsen Norman Group — Primary & Secondary Action Buttons
- Nielsen Norman Group — Visual Hierarchy in UX
- Laws of UX — Von Restorff Effect
- Laws of UX — Hick's Law
- Laws of UX — Fitts's Law
- Material Design 3 — Buttons
- GOV.UK Design System — Button
- Atlassian Design — Button
- Shopify Polaris — Button
Agents get the same rules in condensed form: apps/next/docs/ux-guides/button-hierarchy.md — keep both in sync when the framework changes.