search⌘K

Button

Last Updated: June 2025

Buttons allow users to trigger actions or navigate to new surfaces within the product. They come in a variety of styles and sizes to support clear hierarchy when constructing a UI.

Anatomy

link
Dotted grid scale: 8px
  1. 1Container
  2. 2Prefix
  3. 3Label
  4. 4Suffix
  5. 5Alert Badge

Variants

link

Primary

Highest emphasis, solid accent fill. Use once per view for the main action.

Secondary

Medium emphasis, outlined accent. Pairs with Primary for the secondary action.

Tertiary

Low emphasis, text-only accent. For subtle or inline actions.

Neutral

Neutral surface with a border. For actions that shouldn't carry accent color.

Danger Primary

Solid destructive fill. Highest-emphasis irreversible action — confirm first.

Danger Secondary

Outlined destructive. Medium-emphasis destructive action.

Danger Tertiary

Text-only destructive. Low-emphasis destructive action inline.

Sizes

link

Buttons support 3 sizes: S, M, and L.

Line spacing scale: 8px
28px
36px
48px

Usage Guidelines

link

When to use

  • •To trigger an immediate action (submit, save, delete).
  • •As the primary call-to-action in a form or dialog.
  • •When the action navigates the user but feels like a command.

When not to use

  • •For navigation between pages — use a Link instead.
  • •When the action is destructive without confirmation — use a dialog first.
checkDo

Use one Primary button per view for the main action.

closeDon't

Don't use multiple Primary buttons — it dilutes hierarchy.

checkDo

Use a Danger variant with an explicit destructive label.

closeDon't

Don't use vague labels on Danger buttons — always describe the consequence.

Behaviors

link

Loading state

  • •Set loading=true to replace icon with Spinner and disable interaction.
  • •The button width is preserved during loading to avoid layout shift.

Disabled state

  • •Set disabled=true to prevent interaction.
  • •Disabled buttons are not focusable.

Content Guidelines

link

Labels

  • •Use sentence case ('Save changes', not 'Save Changes').
  • •Start with a verb ('Delete', 'Add member', 'Export CSV').
  • •Keep labels under 3 words where possible.

Icon usage

  • •Use icons to reinforce meaning, not replace labels.
  • •Prefer icon-only buttons (IconButton) when space is very constrained.

Accessibility

link

Text & Labels

  • •Always provide a visible label or aria-label.
  • •For icon-only usage, use IconButton with aria-label.

ARIA attributes

  • •aria-disabled communicates disabled state without removing focus.
  • •aria-pressed for toggle behavior.

Keyboard Support

  • •Tab → focus the button.
  • •Space / Enter → activate.

WCAG Compliance Standards

FAQs

link

When should I use danger variants?

Use Danger Primary for irreversible actions (delete, revoke). Always confirm with a dialog first.

Can I use an icon without a label?

Use IconButton instead — it's optimized for icon-only use with proper accessibility.

How do I handle async actions?

Set loading=true while the action is in flight. The button disables itself and shows a spinner.

link