Molecules - Circuit design system

in development

Dropdown

Description

The dropdown component provides a trigger button that reveals a list of actionable options or choices when activated. Unlike a <select> element, which is designed for form input, a dropdown is an interactive menu pattern that triggers actions, navigation, or displays contextual options.

A collapsed dropdown appears as a button with a chevron icon indicating expandable content. The dropdown button follows the standard button styling (primary, secondary, or subtle, while primary is very unlikely) and includes a visual indicator (typically a downward chevron) to signal its interactive nature.

Dropdowns should not be used as form selects or for single-value data input. Use them when:

Typical Use Cases

Design Characteristics


Usage

HTML Structure

The dropdown must use semantic HTML and ARIA patterns for accessibility. Use a <button> for the trigger and a list structure for the menu items. Use <button> elements for actions and <a> elements for navigation links within menu items.

JavaScript Behavior

The dropdown requires JavaScript to manage state and interactions:

Accessibility

The Dropdown component must conform to WCAG 2.1 AA and the Barrierefreiheitsstärkungsgesetz (2025):

Testing: Validate with Lighthouse, NVDA/JAWS (Windows), and VoiceOver (macOS/iOS). Ensure all interactions work without a mouse.

Integration

Animation

Chevron rotates between up and down at 80ms; the menu fades in (160ms ease-out) and out (120ms ease-in). No stagger, slide, or scale. Everything is instant for prefers-reduced-motion.

Example

Coming soon™


Resources