Amount entry

The big number, what it means under it, a swap pill, quick amounts and a keypad. Cash App simple.

You get about

Specs

Every value is a token from Foundations. The names match Figma and the Flutter file.

Amount
Moonshot/Amount/XL 88/92 on a screen, Amount/L 60/64 in a sheet, tabular figures
Label
Moonshot/Caption under the number, gap/text 2
Swap pill
44 tall, 16 / 12 padding, bg/control, gain in status/success
Quick amounts
4 × 48 pills, gap/inline 8, selected = bg/inverse
Keypad
3 × 4 keys, 64 tall (size/key), Moonshot/Keypad 30/36, round press fill
Number
rolls one glyph at a time; shrinks as a whole to fit the width (never wraps, never below 45%)
Key press
the fill arrives in 50ms and leaves in 320ms, so a quick tap is seen; the digit dips to 86% and springs back
Refused key
more than 2 decimals or 7 digits: the number shakes once, with an error haptic, and nothing changes
Delete
hold to keep deleting: first repeat after 380ms, then 20% faster each time, down to 60ms

Limits

Defined in the component and enforced by the linter: more than this and pnpm lint:ds fails.

4 options at most
Four quick amounts at most; a fifth makes none of them quick.

Usage

Do

  • Keep the number alone and centred; the meaning goes under it.
  • Use the swap pill to flip between what you get and the price.
  • Tick a light haptic on every key.

Don't

  • Don't put a currency picker next to the number.
  • Don't show more than four quick amounts.
  • Don't bold the label: rank by size and ink.

Accessibility

  • Keys are buttons named by their digit; delete is "Delete".
  • The swap pill says what it swaps.
  • Amount uses tabular figures so it doesn't jump while typing.
  • Focus: a 2px focus/ring 2px outside the shape, for keyboard and switch control only. Targets are 44pt or more.