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.

Summarize with
A wireframe sketch on a clipboard with a striped clip, a crossed-out image box and dashed lines, and a curved arrow leading to a phone screen with a green panel, two lines of text and a green button

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.

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.

LevelLooks likeUse it forRule I follow
PrimaryFilled with the brand or accent colourThe main action: Save, Continue, Start free trialOne per view, or per dialog
SecondaryOutlined or a quiet fillThe alternative: Cancel, Back, PreviewPairs with a primary, never competes with it
TertiaryText only, sometimes underlinedLow-stakes actions: Learn more, SkipStill needs a 24px target and a focus ring
DestructiveRed fill or red textDelete, Remove, Cancel subscriptionAsk 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's Human 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.

Anatomy of a button

  1. Container: fill, border and radius. Its edge must show it's a control.
  2. Label: the text that carries the meaning, so I write it first.
  3. Icon (optional): leading icons reinforce the label; trailing ones hint at what comes next, such as a chevron for a menu.
  4. Focus indicator: part of the design, not a browser default to remove.
  5. Hit area: the region that responds to a tap. It can be larger than the visible shape, which is how small buttons stay usable.

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.

SourceMinimumStatus
WCAG 2.2, 2.5.8 Target Size (Minimum)24 by 24 CSS pixels, or enough spacing around smaller targetsLevel AA
WCAG 2.2, 2.5.5 Target Size (Enhanced)44 by 44 CSS pixelsLevel AAA
Apple Human Interface Guidelines, buttonsA hit region of at least 44 by 44 points (60 by 60 in visionOS)Platform guideline
Android accessibility guidanceA touch target of at least 48dp by 48dpPlatform guideline

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.

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".

The rules I follow when I write labels:

  • Verb first, object second. "Download invoice", "Send message", "Create project".
  • 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.

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".

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.

StateWhat changesDetail that matters
DefaultNothing; it's the resting lookEdge and label meet contrast rules
HoverA small shift in fill or borderOnly for devices that hover: wrap it in @media (hover: hover)
Focus-visibleA clear outline with an offsetUse outline, not only box-shadow (see below)
Pressed (active)A darker fill or a 1px moveUse transform so nothing reflows
LoadingSpinner plus the label kept or changed to "Saving"Width stays fixed; repeat clicks are ignored
DisabledFaded, no responsePrefer 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.

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.

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.

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.

:root {
  --button-height: 2.75rem;            /* 44px */
  --button-radius: var(--radius-md);
  --button-primary-bg: var(--color-accent);
  --button-primary-bg-hover: var(--color-accent-strong);
  --button-primary-fg: var(--color-on-accent);
  --button-secondary-border: var(--color-border-strong);
  --button-danger-bg: var(--color-danger);
  --focus-ring: var(--color-focus);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--button-height);
  padding-inline: 1rem;
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  font: inherit;
  font-weight: 600;
  transition: background-color 150ms, transform 100ms;
}
.button[data-variant="primary"] { background: var(--button-primary-bg); color: var(--button-primary-fg); }
.button[data-variant="secondary"] { background: transparent; border-color: var(--button-secondary-border); }
.button[data-variant="danger"] { background: var(--button-danger-bg); color: var(--button-primary-fg); }

@media (hover: hover) {
  .button[data-variant="primary"]:hover { background: var(--button-primary-bg-hover); }
}
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.button[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
type ButtonProps = React.ComponentProps<"button"> & {
  variant?: "primary" | "secondary" | "tertiary" | "danger";
  loading?: boolean;
};

export function Button({
  variant = "primary",
  loading = false,
  type = "button",
  onClick,
  children,
  ...props
}: ButtonProps) {
  return (
    <button
      {...props}
      type={type}
      className="button"
      data-variant={variant}
      aria-disabled={loading || props["aria-disabled"] || undefined}
      onClick={(event) => {
        if (loading || props["aria-disabled"]) {
          event.preventDefault();
          return;
        }
        onClick?.(event);
      }}
    >
      {loading && <span className="button-spinner" aria-hidden="true" />}
      {children}
    </button>
  );
}

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.

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.

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.

  • W3C, Understanding SC 2.5.8 Target Size (Minimum), checked 10 November 2026: w3.org
  • W3C, Understanding SC 2.5.5 Target Size (Enhanced), checked 10 November 2026: w3.org
  • W3C, Understanding SC 1.4.11 Non-text Contrast, 1.4.3 Contrast (Minimum), 2.4.7 Focus Visible and 2.5.3 Label in Name, checked 10 November 2026: w3.org
  • W3C, ARIA Authoring Practices, Button pattern, checked 10 November 2026: w3.org
  • Apple, Human Interface Guidelines, Buttons, checked 10 November 2026: developer.apple.com
  • Android Developers, Make apps more accessible (touch target size), and Compose buttons, checked 10 November 2026: developer.android.com
  • GOV.UK Design System, Button, checked 10 November 2026: design-system.service.gov.uk
  • 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.

Tags: Button design, Components, Accessibility, Design systems, Design engineering

Keep reading

Let’s look at your product.

A free 30 minute call. You leave with a clear next step, whether we work together or not.

Book a free intro call