UI
Buttons
A button does something when it's pressed.
In use
Anatomy
- ContainerRounded 10px, at least 44px tall. An icon button is a 44px circle.
- LabelOutfit, 15px. A verb that says what happens.
- Icon, optional18px, before the label. An icon button has an icon and no label.
States
PrimaryA slightly lighter green on hover.
QuietThe background darkens one step on hover.
IconA soft circle appears on hover.
When to use it
Use a primary button for the one action that finishes a panel, and a quiet button for other actions. Use an icon button where there’s no room for a label.
When not to use it
Don’t use a button to ask a question; use a suggestion chip. A panel never has two primary buttons.
Accessibility
White text on Dugout green reaches 7.7:1 in light mode, and near-black text on the lighter dark-mode green reaches 5.4:1. Icon buttons have a name screen readers announce.
Tokens
In code: Button, with variant set to primary, quiet or icon, in src/ds/components/Button
| Token | What it sets |
|---|---|
--ds-brand | The primary button's fill. |
--ds-brand-hover | The primary button's fill under the pointer. |
--ds-brand-ink | The primary button's text. |
--ds-surface | A quiet or icon button under the pointer. |
--ds-radius-sm | The corners. |
--ds-touch-target | The 44px minimum height. |