System design

Dropdown Menu

Premium

Question

Design a dropdown menu component that can reveal a menu containing a list of actions.

A dropdown menu shown in its closed and open states

Real-life examples

These component libraries demonstrate common dropdown-menu APIs and interaction patterns.

Changelog

  1. Focus behavior on dismissal

    Escape returns focus to the trigger. Tab follows the page's normal focus order, and an outside click keeps its focus destination. aria-expanded tracks whether the menu is open.

  2. Menu keyboard and focus diagrams

    The new keyboard diagrams show how focus moves into the menu, between items, and back to the surrounding page.