Glass dropdown

A pop-up button for a choice between options. The glass menu grows out of its trigger, the pick gets a check.

Your balance
up over the past day

Specs

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

Trigger
48 pill (size/control), 20 / 16 padding, the up and down chevrons (22) after the label. They do not turn when the menu opens
Menu
260 wide, 8 inset (inset/menu), radius 28 (radius/popup)
Align
start: the menu shares the trigger's leading edge. end: its trailing edge, for a trigger on the right of a row (the chart range)
Material
bg/menu + background blur 60 (sigma 30) + 1px line/menu-edge + top-lit rim. No drop shadow
Items
48 tall (size/menu-item), 16 sides, radius 20 (radius/card), pressed bg/highlight
Motion
grows from the trigger's corner on a spring (from scale .94) while the panel fades in, out in 140ms. Nothing above the glass has a filter or an opacity, or the blur would stop working
Rows
arrive 22ms apart; each fades its own fill on hover and press, nothing slides between rows
Pick
the check travels to the picked row, the menu leaves 170ms later, and the trigger's label rolls
Chart range
1 day, 1 week, 1 month, 1 year, All time. On the pick the gain rolls and the old line turns into the new one (see Price chart)
Keys
Enter, Space or Down opens with focus on the current choice; Up, Down, Home, End move; Enter picks; Escape closes and focus returns

Usage

Do

  • Use it for mutually exclusive choices: the chart range on the coin page, how long an Auto sell runs.
  • Show the current choice on the trigger.
  • Open upward when there's no room below.

Don't

  • Don't hide actions in it; actions are buttons.
  • Don't stack a menu on a menu.
  • Don't put more than 6 or 7 items before it scrolls.

Accessibility

  • Trigger has aria-haspopup and aria-expanded.
  • Items are menuitemradio with aria-checked.
  • Escape closes and returns focus to the trigger.
  • Focus: a 2px focus/ring 2px outside the shape, for keyboard and switch control only. Targets are 44pt or more.