Behive Tech Component Registry

Dropdown Menu

v0.3.0Stable

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.

pnpm add @behivetech/atoms.dropdown-menu

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

Open in new tab

Properties

DropdownMenu props

PropTypeDefaultDescription
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"startAlignment of the menu relative to the trigger; defaults to "start"
classNamestring—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)
openboolean—Controlled open state