Skip to content
TrademarkTrademark
Docs
Components

Dropdown

Updated: May 9, 2025
View on GitHub

The Dropdown component is a container for displaying selectable options in a dropdown menu. It provides a way to present a list of selectable options with various styling and interaction capabilities.

Basic usage

A simple dropdown container with options.

With icons

Enhance dropdown options with icons for better visual communication.

With descriptions

Add descriptive text to dropdown options for additional context.

Custom styling

Customize the appearance of the dropdown with Flex props.

Accessibility

The Dropdown component follows accessibility best practices:

  • Uses role="listbox" for the dropdown container
  • Provides aria-selected state for selected options
  • Supports keyboard navigation
  • Properly manages focus when opening and closing

API reference

Type
Default
selectedOption
string—
children
React.ReactNode—
onEscape
() => void—
onSelect
(event: string) => void—
disabled
Prevent interaction with the dropdown.
booleanfalse
…and every FlexProps propinherited—
  • DropdownWrapper - A container for creating dropdown menus with positioning and state management
  • Option - Individual selectable items used within dropdowns
Edit this page on GitHub