Button
A control that performs an action in place, such as submitting a form or opening a dialog, without changing the URL.
Why it's built this way
| Decision | Why |
|---|---|
| Variants name a visual weight (accent, neutral, transparent, danger), not a rank like primary or secondary. The surrounding layout picks the weight. | Rank depends on the other buttons around it. A card's main action is secondary on a page that already has a primary, and twelve cards would show twelve primaries. (See ADR-024.) |
| The default variant is neutral, not accent. | Leaving out variant shouldn't add a competing call to action. (See ADR-024.) |
transparent is a ghost button: link-coloured text, the usual padding, and a fill on hover. Its label sits slightly inset from the content edge instead of lining up with it. | The hover fill needs room around the label. Material 3 text buttons accept the same inset. (See ADR-024.) |
Icon-only buttons are a shape (square or round), not a variant. With a shape set, icon and aria-label are required, and children and trailingIcon aren't allowed. | The icon is the only thing on the button, so screen readers need aria-label to name it. |
The label is plain text inside the button, not wrapped in Text. | The button sets the label's type styles for each size itself, so a Text wrapper isn't needed. |
Every component follows ADR-025, ADR-026 and ADR-028(states, prop vocabulary, focus indicator); they are not repeated per component.