Dropdown Menu
v0.3.0StableA trigger that opens a list of selectable items, built on Radix's DropdownMenu for focus management, keyboard navigation and close on outside click or Escape.
A trigger that opens a list of selectable items, built on Radix's DropdownMenu for focus management, keyboard navigation and close on outside click or Escape.
Usage
Examples
Open all 2 →Properties
DropdownMenu props
| Prop | Type | Default | Description |
|---|---|---|---|
items* | DropdownMenuItem[] | — | Items rendered in the menu |
onSelect* | (id: string) => void | — | Called with the selected item's id when an item is chosen |
trigger* | ReactNode | — | Element that opens the menu when activated — receives the trigger's props via Radix's `asChild` |
align | "center" | "start" | "end" | start | Alignment of the menu relative to the trigger; defaults to "start" |
className | string | — | Additional class names to merge with the menu content element |
onOpenChange | ((open: boolean) => void) | — | Called when the open state changes (trigger click, item select, outside click, Escape) |
open | boolean | — | Controlled open state |