- Accordion
- Avatar
- Badge
- Breadcrumb
- Button
- Calendar
- Checkbox
- Combobox
- Container
- CurrencyInput
- DistributionSlider
- Drawer
- Dropdown
- Grid
- Heading
- Image
- Input
- InputGroup
- Label
- Logo
- MapPin
- Modal
- NativeSelect
- NumberInput
- OtpInput
- PhoneInput
- Popover
- Progress
- PropertyCalendar
- RadioGroup
- RadioGroupCards
- ResponsiveModal
- ScrollArea
- SearchBar
- SearchBarFallback
- SearchInput
- Select
- Separator
- Spinner
- Switch
- Tabs
- Text
- Textarea
- Toast
- Toggle
- ToggleGroup
- Tooltip
Dropdown
A menu of actions or options, triggered by a button
pnpm add @wandercom/design-system-web
Built on Radix UI primitives, the dropdown supports icons, keyboard shortcuts, separators, checkboxes, radio groups, and nested submenus.
import {
Dropdown,
DropdownTrigger,
DropdownContent,
DropdownItem,
} from '@wandercom/design-system-web/ui/dropdown';
export function Example() {
return (
<Dropdown>
<DropdownTrigger asChild>
<button>Open menu</button>
</DropdownTrigger>
<DropdownContent>
<DropdownItem>Profile</DropdownItem>
<DropdownItem>Settings</DropdownItem>
<DropdownItem>Logout</DropdownItem>
</DropdownContent>
</Dropdown>
);
}The dropdown trigger supports a styled default variant matching SelectTrigger, a sm size, and an unstyled variant for custom trigger elements via asChild.
A simple dropdown menu with basic items.
Add icons to menu items for visual clarity.
Group related items with separators and labels.
Display keyboard shortcuts alongside menu items.
Use checkboxes for togglable options.
Use radio groups for mutually exclusive options.
Create nested menus for hierarchical options.
Use the destructive variant to indicate dangerous actions.
Use the inset prop to align items with labels or icons.
open?:
defaultOpen?:
onOpenChange?:
modal?:
variant?:
size?:
asChild?:
className?:
className?:
sideOffset?:
side?:
align?:
alignOffset?:
className?:
variant?:
inset?:
disabled?:
onSelect?:
className?:
checked?:
onCheckedChange?:
disabled?:
className?:
value?:
onValueChange?:
value:
disabled?:
className?:
inset?:
className?:
className?:
className?:
open?:
defaultOpen?:
onOpenChange?:
inset?:
disabled?:
className?:
sideOffset?:
className?:
The dropdown is built on Radix UI primitives with full accessibility support:
- Uses semantic
menurole and appropriate ARIA attributes - Supports keyboard navigation with arrow keys
- Opens and closes with Enter or Space
- Closes on Escape key press
- Supports typeahead to jump to matching items
- Manages focus automatically when opened and closed
- Honors disabled state on individual items
- Checkbox and radio items include proper ARIA state attributes