Dropdown Menu

Radix-powered action menu with destructive items, checkbox/radio selection, submenus, and shortcuts.

DropdownMenu wraps @radix-ui/react-dropdown-menu: a trigger opening an anchored action menu with typeahead, roving focus, and full menu semantics. Compound exports cover items, checkbox/radio selection, submenus, labels, separators, and shortcut hints.

Installation

import {
  DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem,
} from "@iammikz/srui";

Usage

Exports

ExportNotes
DropdownMenuRoot; open/onOpenChange for controlled use
DropdownMenuTriggerThe toggle target (asChild supported)
DropdownMenuContentThe panel; align, sideOffset
DropdownMenuItemAction row; variant="destructive", inset, disabled
DropdownMenuCheckboxItem / DropdownMenuRadioGroup / DropdownMenuRadioItemSelection rows
DropdownMenuSub / DropdownMenuSubTrigger / DropdownMenuSubContentSubmenus
DropdownMenuLabel / DropdownMenuSeparator / DropdownMenuShortcutStructure

Accessibility

Radix menu semantics: role="menu"/menuitem, arrow-key navigation, typeahead, aria-checked on selection items, Escape dismissal with focus restored to the trigger. variant="destructive" items keep their role but render the danger treatment.

Upgrades over the PRUI original: the destructive item variant and the shortcut hint slot.