How to design buttons people notice, understand and can press
Button design that holds up in production: hierarchy, anatomy, touch target sizes, verb-first labels, icon buttons, every state, contrast and token-based React code.
Maniruzzaman JubayerDesign engineer and product design lead · Published Nov 20, 2026 · 12 min read
Summarize with
Good button design comes down to five things: a clear hierarchy, so the one action that matters most on a screen looks like it; a label that names the action with a verb; a target big enough to hit (at least 24 by 24 CSS pixels for WCAG 2.2, 44 points on iOS, 48dp on Android); every state designed, including focus, loading and disabled; and the right element underneath, a <button> for actions and a link for navigation. Get those right and the style (filled, outlined, rounded or square) is a matter of taste. Get them wrong and no amount of polish saves the button.
I'm a design engineer: I design products and build them in production code, so this guide covers the design rules and the HTML, CSS and React that make buttons hold up. It's part of my design engineering work.
01
Button hierarchy: primary, secondary, tertiary and destructive
Five equally loud buttons ask for five decisions. The GOV.UK Design System's button page puts it plainly: too many calls to action make it hard for users to know what to do next.
Level
Looks like
Use it for
Rule I follow
Primary
Filled with the brand or accent colour
The main action: Save, Continue, Start free trial
One per view, or per dialog
Secondary
Outlined or a quiet fill
The alternative: Cancel, Back, Preview
Pairs with a primary, never competes with it
Tertiary
Text only, sometimes underlined
Low-stakes actions: Learn more, Skip
Still needs a 24px target and a focus ring
Destructive
Red fill or red text
Delete, Remove, Cancel subscription
Ask for confirmation or offer undo
Real design systems split the levels in similar ways, with different names:
Material Design has five button types. Android's Compose button docs call filled buttons high emphasis, for actions such as "submit" and "save", outlined buttons medium emphasis, for "Cancel" or "Back", and text buttons the lowest; filled tonal and elevated sit in between.
Apple'sHuman Interface Guidelines for buttons give buttons a role. A primary button uses the app's accent colour and a destructive button uses system red. One rule I copy into every project: don't give the primary role to a destructive action, even when it's the likeliest choice, because people sometimes press a prominent button without reading it.
GOV.UK has a default green button, a start button, a secondary button and a warning button, and says warning buttons only work if used very sparingly, and most services shouldn't need one.
shadcn/ui, the React component library many teams start from, ships six button variants: default, secondary, outline, ghost, destructive and link.
In Stripe's header (HTML read 10 November 2026), Contact sales is a compact primary button and Sign in a quieter secondary one beside it: the action wanted from a new visitor gets the weight.
02
Anatomy of a button
Container: fill, border and radius. Its edge must show it's a control.
Label: the text that carries the meaning, so I write it first.
Icon (optional): leading icons reinforce the label; trailing ones hint at what comes next, such as a chevron for a menu.
Focus indicator: part of the design, not a browser default to remove.
Hit area: the region that responds to a tap. It can be larger than the visible shape, which is how small buttons stay usable.
03
Button size and touch targets
These are the numbers I design to. They're different units, so treat them as three separate rules rather than one number.
The 24px rule has exceptions, the main one being spacing: an undersized target passes if a 24px circle centred on it doesn't overlap another target. Links inside a sentence are exempt too.
In practice, I make main web buttons 44px tall and pad small icon buttons out to a 44px hit area on touch layouts. For reference, shadcn/ui's default button is h-9 (36px) and its smallest icon size size-6 (24px), the AA floor and nothing more. On phones, Apple prefers full-width primary buttons because they're easier to tap.
04
Button labels: start with a verb
A button label is a promise about what happens next. Apple suggests starting labels with a verb, and gives "Add to Cart" as the example. GOV.UK asks for sentence case labels that describe the action, such as "Start now", "Sign in" and "Save and continue".
Say the outcome. "Submit" names a mechanism; "Send application" names the result.
Match the label to the result. If the button opens a payment page rather than charging the card, don't call it "Pay now".
Name the cost of destructive actions. "Delete 3 files" beats "Confirm".
No "Click here". Screen reader users often move through a page by its controls, so each label must make sense alone.
05
Icon buttons need an accessible name
A button with only an icon has no name for assistive technology. MDN's `<button>` reference is direct about this: icon-only buttons don't have an accessible name until you give them one.
<!-- Icon only: name it, hide the icon from screen readers -->
<button type="button" aria-label="Close dialog">
<svg aria-hidden="true" focusable="false">...</svg>
</button>
<!-- Toggle: the label stays the same, the state changes -->
<button type="button" aria-pressed="false">Mute</button>
Two details people miss. First, when a button has visible text and an aria-label, the visible words must be part of the accessible name, or voice control users can't activate it by saying what they see; that's 2.5.3 Label in Name, Level A. Second, for a toggle, the W3C's button pattern says the label must not change when the state changes: keep "Mute" and flip aria-pressed, rather than swapping the text to "Unmute".
06
Every button state, and how to design each one
The Nielsen Norman Group's article on button states (Kelley Gordon, April 2025) names five: enabled, disabled, hovered, focused and pressed. I add loading, because almost every button that talks to a server needs it.
State
What changes
Detail that matters
Default
Nothing; it's the resting look
Edge and label meet contrast rules
Hover
A small shift in fill or border
Only for devices that hover: wrap it in @media (hover: hover)
Focus-visible
A clear outline with an offset
Use outline, not only box-shadow (see below)
Pressed (active)
A darker fill or a 1px move
Use transform so nothing reflows
Loading
Spinner plus the label kept or changed to "Saving"
Width stays fixed; repeat clicks are ignored
Disabled
Faded, no response
Prefer explaining why over disabling
Focus rings.WCAG 2.4.7 Focus Visible is Level AA, and `:focus-visible` shows the ring for keyboard users without flashing it on every click. Draw it with outline. Tailwind's ring utilities are a box-shadow, and MDN's forced-colors page says box-shadow is forced to none in forced colours mode, so the ring vanishes for people who need it most. shadcn/ui's button pairs a ring with outline-none; when I build on it, I add a transparent outline that forced colours mode can paint.
Disabled versus aria-disabled. The disabled attribute removes the button from the tab order, so keyboard and screen reader users may never learn it exists. Per MDN, aria-disabled="true" announces the state but keeps the button focusable; your code blocks the action. GOV.UK says disabled buttons have poor contrast and can confuse some users, so avoid them unless research shows they help. On forms, I keep submit active and show clear errors. When I need an unavailable state, I use aria-disabled with the reason in text beside it.
Loading and double clicks. GOV.UK lists why people click twice: operating system habits, slow connections with no quick feedback, and motor impairments such as tremors. A loading state that ignores repeat presses stops duplicate orders. Keep the width fixed while the spinner shows.
07
Button or link?
Use the element that matches what happens, not what it looks like:
It goes somewhere (another page, a section, a file): <a href>, even if it's styled as a big green button. GOV.UK's own start buttons are links for this reason.
It does something (submits, opens a dialog, toggles, deletes): <button>.
Links can open in new tabs and are listed by screen readers as links; buttons respond to Space as well as Enter. One more trap: per MDN, a <button> inside a form defaults to type="submit", so a "Show password" button without type="button" submits the form.
08
Contrast for buttons
Two WCAG rules apply. The label text needs 4.5:1 against the button fill under 1.4.3 Contrast (Minimum), or 3:1 for large text. And under 1.4.11 Non-text Contrast, the visual information needed to identify the button, such as the border of an outlined button, needs 3:1 against what's next to it. A pale grey outline on white is the failure I find most. Inactive components are exempt, which is why disabled buttons are so hard to read. I check every pair in light and dark mode; see my guide to an accessible colour palette shows how.
09
Building a button with design tokens, CSS and React
I name button tokens the same in Figma and in code, and point them at semantic colour tokens, so a theme change or dark mode needs no edits to the component. More on that set-up in my design tokens guide.
type defaults to "button", so nothing submits by accident; forms pass type="submit" on purpose. While loading, the button stays focusable and announces itself as unavailable, and a status message elsewhere on the page (a live region) tells screen reader users when the save finishes.
10
Frequently asked questions
What makes a good button design?
A clear place in the hierarchy, a verb-first label, a hit area of at least 24px (44px or 48px on touch), designed states, enough contrast and the right HTML element.
How big should a button be?
WCAG 2.2 AA asks for 24 by 24 CSS pixels or enough spacing; Apple asks for 44 by 44 points and Android for 48dp. I design main web buttons at 44px tall.
How many primary buttons should a page have?
One per view or dialog. A long landing page can repeat the same primary action in several sections, but two different primary actions side by side split attention.
Should I use disabled buttons?
Sparingly. They're exempt from contrast rules and disabled removes them from keyboard focus. Keep the button active and explain errors, or use aria-disabled with a visible reason.
When should I use a link instead of a button?
When it takes people somewhere, use a link, even if it's styled as a button. When it performs an action, such as saving or opening a dialog, use a button.
Can you design and build a button system for my product?
Yes. I design the buttons, their states and tokens in Figma and build them in TypeScript, React and Next.js, with the same names in both. See my design engineering page.
11
Sources and method
I searched "button design" on 10 November 2026 and read the top results. Most were style galleries and tips lists; few covered aria-disabled, forced colours mode, the type default or how to build the states in code, so this guide adds those. I read every source below on 10 November 2026, and read Stripe's header from its served HTML.
Nielsen Norman Group, 5 Button States: Communicate Interaction, checked 10 November 2026: nngroup.com
MDN, the button element, aria-disabled, :focus-visible and forced-colors, checked 10 November 2026: developer.mozilla.org
shadcn/ui, Button documentation and source, checked 10 November 2026: ui.shadcn.com
Tailwind CSS, box-shadow and ring utilities, checked 10 November 2026: tailwindcss.com
Stripe home page header, HTML read 10 November 2026: stripe.com
If you're building a product and want its buttons, states and components designed and built as one system, book a free 30 minute intro call. After it, you get a written scope and one fixed quote.