Button
A button triggers an action or a navigation. The Role axis sets hierarchy — Primary for the main action in a context, Secondary for supporting ones — and Size (lg, md, sm) matches the density of its surroundings.
- Design
- Finished
- Level
- Draft
- Audit
- 5 open findingsat the audit of
- Last changed
- Resources
- Figma Propose a change
Preview


Usage
Do
- Choose
Rolefirst, thenSizeto match surrounding density - Limit
Primaryto one per context - Set the label through
Label text
Don't
- Use two
Primarybuttons in the same context - Use a button for a plain in-page link: use a link
- Disable a button without saying why the action is unavailable
Behaviour
Iconreveals a leading icon, supplied throughIcon swapState(Focus,Hover,Press) andDisabledare managed by code and not applied in static designs
Composition
- The icon is supplied through the
Icon swapprop and revealed by theIconboolean; import the icon component rather than redrawing it
Accessibility
Follows the WAI-ARIA button pattern: roles, keyboard and focus behaviour.
Dependencies in Figma
Places 1 component from another library: Icon/plus / Size=20. This snapshot does not hold them, so this page cannot link to them or describe them.
Level checks
Draft · next level blocked by Errors open
| Check | Level | Result |
|---|---|---|
| Audited | Ready | Passes |
| No errors open | Ready | 4 errors open |
| Has a description | Ready | Passes |
| Usage and Don't written | Ready | Checked at the next audit |
| Every layer named | Ready | Passes |
| In code | Ready | Passes |
| No warnings open | Stable | Not yet |
| Code gen notes written | Stable | Checked at the next audit |
| Auto layout throughout | Stable | Checked at the next audit |
| Matches the design | Stable | Passes |
Anatomy
| # | Part | Shown | Component |
|---|---|---|---|
| 1 | Icon | By Icon | plus |
| 2 | Label | Always | – |
Properties
| Property | Type | Values | Default |
|---|---|---|---|
| Size | Variant | lgmdsm | lg |
| Role | Variant | PrimarySecondary | Primary |
| Disabled | Variant | FalseTrue | False |
| State | Variant | RestFocusHoverPressLoading | Rest |
| Icon | Boolean | true, false | false |
| Label text | Text | any text | Label |
1 instance swap (icons and parts a designer can replace)
- Icon swap
States
| State | Set by |
|---|---|
| Focus | Interaction |
| Hover | Interaction |
| Press | Interaction |
| Loading | The State property |
| Disabled | The Disabled property |
Implementation
| Figma | Code | Why |
|---|---|---|
| Focus ring, a layer 4px outside the box | outline on :focus-visible, outline-offset 4px less the ring's width | Figma has no focus state, so it draws the ring as a layer; in code it is not an element. |
| Spinner, absolute position | position: absolute in a positioned parent | Out of the flow: it neither pushes siblings nor sizes the parent. |
| Container, inside stroke | border with box-sizing: border-box and padding less the stroke, or box-shadow: inset 0 0 0 <width> | Figma's inside stroke takes no space; a border does. |
Role | appearance | role is ARIA's: role="primary" would tell a screen reader the element has a role by that name. |
Disabled | disabled, or aria-disabled where it must stay focusable | The element's own state: the browser keeps it out of the tab order and out of form submission. |
State: Focus, Hover, Press | :focus-visible, :hover, :active | Pseudo-classes the browser sets, so a template cannot claim a state the control is not in. Loading is not a pointer state and stays a property. |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Container: fill | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Container: width · 6 variants | Restyled | Breaking | Minor | |
| Content: width · 4 variants | Restyled | Breaking | Minor | |
| Content: height · 2 variants | Restyled | Breaking | Minor | |
| Content: position · 3 variants | Restyled | Breaking | Minor | |
| Label: width · 2 variants | Restyled | Breaking | Minor | |
| Label: height · 2 variants | Restyled | Breaking | Minor | |
| Button: width · 6 variants | Restyled | Breaking | Minor | |
| Focus ring: width · 6 variants | Restyled | Breaking | Minor | |
| Spinner: position · 2 variants | Restyled | Breaking | Minor | |
| Label: position · 2 variants | Restyled | Breaking | Minor | |
| Label: text style | Restyled | Minor | Minor | |
| Label: line height | Restyled | Minor | Minor | |
| Label: letter spacing | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Layer Icon | Removed | Breaking | Minor | |
| Container: width | Restyled | Breaking | Minor | |
| Content: position | Restyled | Breaking | Minor | |
| Button: width | Restyled | Breaking | Minor | |
| Property links | Not graded | Not graded | Not graded | |
| Property State | Added | Minor | Minor | |
| Variants | Added | Minor | Minor | |
| Layer Content | Renamed | Patch | Minor | |
| Layer Container | Added | Minor | Patch | |
| Layer Icon | Added | Minor | Patch | |
| Button: width · 3 variants | Restyled | Breaking | Minor | |
| Focus ring: width · 2 variants | Restyled | Breaking | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Description | Docs | Patch | Patch |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Content: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Label: height · 2 variants | Restyled | Minor | Minor | |
| Label: position · 3 variants | Restyled | Minor | Minor | |
| Label: line height | Restyled | Minor | Minor | |
| Content: stroke | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Content: stroke | Restyled | Minor | Minor | |
| Content: strokeSides | Restyled | Minor | Minor | |
| Content: stroke alignment | Restyled | Minor | Minor | |
| Content: effect style | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Content: fill · 3 variants | Restyled | Minor | Minor |
| Change | Type | Figma files | Code | Details |
|---|---|---|---|---|
| Content: stroke | Restyled | Minor | Minor | |
| Content: strokeSides | Restyled | Minor | Minor | |
| Content: stroke alignment | Restyled | Minor | Minor | |
| Content: clipping | Restyled | Minor | Minor | |
| Content: effect style | Restyled | Minor | Minor | |
| Variants added | Not graded | Not graded | Not graded | |
| Its values moved | Restyled | Minor | Minor | |
| Component | Added | Minor | Minor |