DropdownMenu
Dropdown menu anchored to a trigger. Built on Radix.
Examples
Row actions
<DropdownMenu><DropdownMenuTrigger asChild><IconButton icon={MoreHorizontal} variant="outline" aria-label="More" /></DropdownMenuTrigger><DropdownMenuContent align="start"><DropdownMenuItem><Edit size={14} /> Edit</DropdownMenuItem><DropdownMenuItem><Mail size={14} /> Send email</DropdownMenuItem><DropdownMenuItem className="text-destructive"><Trash2 size={14} /> Delete</DropdownMenuItem></DropdownMenuContent></DropdownMenu>
API Reference
Props of the DropdownMenu component.
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled mode. |
defaultOpen | boolean | false | — |
onOpenChange | (open: boolean) => void | — | — |
align | 'start' | 'center' | 'end' | 'center' | On the content. |