Components · Form Controls

Button

Starts an action, such as saving or deleting.

Automated a11y scan passing Element: <button>

Component Workbench

Switch between the live interactive preview, syntax-highlighted implementation code, copyable AI coding agent prompt, and designer anatomy blueprint.

Button · Canonical Spec

When to use it

Do

  • Start the label with a verb, such as "Save changes".
  • Use one primary button per area.

Don't

  • Use it to go to another page. Use Link instead.
  • Disable it without explaining why.

Accessibility & Keyboard Interaction

Requirements for using this component accessibly, following the W3C ARIA Authoring Practices Guide.

Interaction / KeyBehavior & Compliance Requirement
Native SemanticsStandard <button type="button"> avoids unintended form submissions.
Keyboard TriggerActivated by both Enter and Space keys natively.
Focus-Retaining DisabledDeclares aria-disabled="true" to remain in tab order while blocking execution.
Async LoadingSets aria-busy="true", renders .as-spinner, and blocks duplicate clicks.

Tokens

Values update with the current theme.

RoleTokenCurrent value
Primary Fill--as-semantic-color-interactive-primary
Text on Primary--as-semantic-color-interactive-primary-text
Horizontal Padding--as-space-6
Control Height--as-space-12
Pill Radius--as-radius-full
Esc
↑↓ navigateEnter openEsc close