DocsComponents
Button
A pill with a 2 px border and a touch target of at least 44 px. Every variant shares one base and differs only by colour tokens.
- 1Container: pill (radius 9999 px), min. height 44 px
- 2Border 2 px in the variant’s border token
- 3Icon 16 / 20 / 24 px (sm / default / lg), optional
- 4Label: Inter 600, one line, no wrap
Variants
Five variants, one base. They differ only by colour tokens; on hover every variant moves to deep blue, the accent of the whole system.
Sizes
Small changes padding, type and icon size, not the touch target: sm still measures at least 44 px high.
With icons
States
Hover and focus are forced below so they show without a mouse. The live buttons above react to the real pointer and keyboard.
Rest Hover Focus Disabled
Rest Hover Focus Disabled
Rest Hover Focus Disabled
Rest Hover Focus Disabled
Dark tone
On dark surfaces outline gets a 20 % white border and white text; ghost turns white and fills deep blue on hover.
API reference
Props of Button and ButtonLink. Any other native button attribute passes through.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "outline" | "ghost" | "link" | "default" | Colour set. All variants share one base (shape, border, sizes). |
size | "sm" | "default" | "lg" | "default" | sm and default keep a 44 px minimum height; lg is 48 px. |
tone | "light" | "dark" | "light" | Dark tone re-colours outline and ghost for dark surfaces. |
type | "button" | "submit" | "reset" | "button" | Native button type; never submits a form by accident. |
disabled | boolean | false | 50 % opacity, no pointer events. |
href + link | string + link component | – | ButtonLink: the same look for navigation; the app injects its router link. |
Accessibility
- Native button element: Enter and Space work, screen readers announce a button.
- Touch target of at least 44 × 44 px in every size (WCAG 2.5.5).
- Focus-visible ring 3 px in the ring token at 50 %; hover alone never carries meaning.
- Contrast: default 15.7:1, hover 7.6:1, secondary 16.3:1, outline 13.3:1 on the page background.
- Link variant: 4.76:1 on white but 4.32:1 on the page background, so it belongs on cards, not directly on the lilac page.
- Icon-only buttons need an accessible name (aria-label); icons themselves are aria-hidden.