Swipe to confirm
Money moves only on purpose: swipe the handle, or press and hold for 0.9 seconds. Done turns the track green and a few dots drift off its edge.
Or press and hold
Specs
Every value is a token from Foundations. The names match Figma and the Flutter file.
Track
64 tall (
size/button-l), radius full, bg/controlHandle
56 circle,
accent/fill, 4 in from the track, no shadowProgress
accent/tint, follows the handle or the holdHold
confirms after 900ms (MoonshotMotion.holdToConfirm). The control presses in to .97 in 180ms; the fill runs linear for 700ms with a soft light at its front (
accent/fill, blur 9) and a tick at each third; it stays full for 200ms, then confirms and springs back with a little bounce. Letting go early drains it in 180ms, a press during the drain carries on from where the fill is, and sliding 20 off the control backs outDots
32 points spread evenly along the pill's edge, 4 dots a second each, from 50ms before the fill is full until 180ms after the confirm (430ms after a swipe). A dot leaves within 126° of the edge's normal at 25 ± 8.5 pt/s, is 3.6 ± 1.1 across, fades by .38 a second and is gone after about 2.1s.
text/primary, accent/text, status/success. Dots that left before a hold was dropped are taken back in 150ms: they only ever mean it workedReference
the hold and the dots follow the 60fps shot "Opal Hold to Commit Button Interaction", for the fill and the dots. Three things differ on purpose: the length (2.2s there, try it under Hold time; 0.9s here), the press depth (.95 there, the system's .97 here) and the curve (the system's ease-out)
Arm
past 88% of the track: a tick, and the chevrons turn into a check before you let go
Release
armed, or flicked faster than 500pt/s past 35%, it runs home and confirms; otherwise it springs back with the release speed
Idle
a slow light crosses the label left to right every 4.2s; off under reduced motion
Done
status/success-tint track, check + label in status/successHint
Moonshot/Caption, text/tertiary, error in status/dangerLimits
Defined in the component and enforced by the linter: more than this and pnpm lint:ds fails.
1 per surface
The swipe is the primary action of its surface. Don't pair it with a primary button or a second swipe.
Usage
Do
- Name the action on the track: "Swipe to start Auto sell".
- Keep press and hold as the equal alternative to the swipe.
- Fire a heavy haptic exactly when it confirms.
- Let the dots say it worked, once, for a confirmed money move.
Don't
- Don't use it for anything that isn't moving money.
- Don't put a second primary button next to it.
- Don't reset silently after an error: say what happened in the hint.
- Don't add more: no confetti, no sound of coins. Playful, never casino.
Accessibility
- role=button; Enter or Space held for 0.9s confirms.
- The hint line is announced; the error replaces it.
- Reduced motion: the handle jumps, the hold still takes 0.9s, and there is no press-in, no blur and no dots: the green track and the check carry the result.
- Focus: a 2px
focus/ring2px outside the shape, for keyboard and switch control only. Targets are 44pt or more.