A dropdown menu tucks a list of actions behind one button. These examples follow the WAI-ARIA menu button pattern: Enter, Space or the arrow keys open the menu, arrows move between items, Home and End jump to the ends, typing a letter jumps to a matching item, a disabled item is skipped and Escape closes the menu and returns focus. Eight styles, light and dark, with HTML, CSS and plain JavaScript. Every example is an original design that comes with its HTML code and a DESIGN.md of colour, type and spacing tokens, in light and dark. Free to use and adapt.
16 examples
A select (or listbox) picks a value that is submitted with a form. A menu runs a command straight away. Screen readers announce them differently, so pick the role that matches what happens.
Menu items are reached with the arrow keys, not Tab. Setting tabindex="-1" lets the script move focus to them while keeping the whole menu a single tab stop.
App screens
UI components
Website sections
Website templates
search_ui_screens (e.g. “billing settings, editorial style”), get_ui_flow for a whole journey, and get_ui_screen_code to pull the HTML and DESIGN.md straight into your project.