Skip to main content

Module dropdown_menu

Module dropdown_menu 

Source
Expand description

Dropdown Menu Component (shadcn/ui style)

Dropdown menus with keyboard navigation, checkbox items, radio groups, submenus, and destructive variants.

Styled to match shadcn/ui dropdown-menu:

  • Content: bg-popover text-popover-foreground border rounded-md p-1 shadow-md
  • Item: px-2 py-1.5 text-sm rounded-sm gap-2
  • Item hover: focus:bg-accent focus:text-accent-foreground
  • Destructive: text-destructive focus:bg-destructive/10
  • Disabled: opacity-50
  • Shortcut: text-muted-foreground text-xs ml-auto tracking-widest
  • Separator: bg-border h-px -mx-1 my-1
  • Label: px-2 py-1.5 text-sm font-medium

Structsยง

DropdownMenu
Dropdown menu component (shadcn/ui Dropdown Menu)
DropdownMenuItem
Pre-built dropdown menu item (alternative to builder pattern)
DropdownMenuResponse
Response from showing a dropdown menu
MenuBuilder
Builder for constructing menu contents
MenuItemBuilder
Builder for chaining menu item modifiers