Vesture
Get started

Overlays

DropdownMenu

A click-triggered action menu with full arrow-key navigation, built as a compound component around a trigger element.

DropdownMenuDropdownMenuItem

Preview

Usage

tsx
import { DropdownMenu, DropdownMenuItem, Button } from "@vesture/react";

<DropdownMenu trigger={<Button>Options</Button>}>
  <DropdownMenuItem onSelect={() => rename()}>Rename</DropdownMenuItem>
  <DropdownMenuItem onSelect={() => remove()}>Delete</DropdownMenuItem>
</DropdownMenu>

Behavior

  • useListNavigation drives looping arrow-key navigation between items (roving tabindex).
  • role="menu" / role="menuitem"; renders through a non-modal FloatingPortal.

Props

DropdownMenu

PropTypeDefaultDescription
triggerReactElementRequired. Cloned with floating-ui reference props; click opens the menu.
placementPlacement"bottom-start"Floating UI placement.
childrenReactNodeDropdownMenuItem elements.

DropdownMenuItem

PropTypeDefaultDescription
onSelect() => voidFires on click, then closes the menu.
disabledbooleanStandard disabled.
...restButtonHTMLAttributes<HTMLButtonElement>Spread onto the item button.