Button
Four types, two sizes. Large is 64 tall and fully round; one primary per screen.
Specs
Every value is a token from Foundations. The names match Figma and the Flutter file.
Large
64 tall (
size/button-l), full width, Moonshot/Label/Button 17/24Small
48 tall (
size/control), 20 sides (inset/control-x), Moonshot/Label/Control 16/24Primary
accent/fill + text/on-accent (5.89:1), pressed accent/pressedSecondary
bg/control, pressed bg/control-pressedDestructive
bg/control + status/danger label; never the primaryPress
scale .97, 150ms ease-out
Label change
a label that changes on the same button keeps the letters both labels share (see Text motion)
Copy button
CopyButton: the copy icon turns into a check and the label becomes Copied, with a success haptic. It goes back by itself after 1.8s
Flat
no outline, no shadow in Dark and Light
Limits
Defined in the component and enforced by the linter: more than this and pnpm lint:ds fails.
1 per surface
One primary per surface: it is the next step. Make the others secondary or tertiary.
Usage
Do
- One primary per surface, the real next step.
- Swap the label for a spinner + "Saving…" in place while it works.
- Put two Large buttons side by side only as Secondary + Primary.
Don't
- Don't use magenta for anything else on the screen.
- Don't make a destructive action the primary.
- Don't shrink Large buttons below 64.
Accessibility
- Label text identifies the button; icons are hidden from screen readers.
- Disabled keeps a readable label (
text/tertiary). - Focus ring 2px, 2px outside.
- Focus: a 2px
focus/ring2px outside the shape, for keyboard and switch control only. Targets are 44pt or more.