Skip to Content
glob.ui home
Components

Dropdown menu

A menu of actions, checkbox items and radio items, opened from a trigger.

Client componentUses state or handlers, so it starts with "use client".
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut } from "@glob-ui/dropdown-menu"

Preview

Last action: none · Theme: system

API

Props are generated from the TypeScript types in the package source.

Prop

Type

Prop

Type

Prop

Type

Prop

Type

Prop

Type

Prop

Type

Prop

Type

Accessibility

Key or actionBehaviour
Enter, Space, ArrowDown on the triggerOpens the menu and focuses the first item. ArrowUp focuses the last item.
Arrow keys, Home, EndMove between items, looping at the ends. Disabled items are skipped.
LettersTypeahead.
Enter, Space on an itemRuns onSelect, then closes. Checkbox and radio items stay open. Call preventDefault() in onSelect to keep the menu open.
EscapeCloses and returns focus to the trigger.
TabCloses the menu and moves focus on.
Pointer hoverMoves focus to the hovered item.

ARIA. The trigger has aria-haspopup="menu" and aria-expanded. The content is role="menu", named by the trigger. Items are menuitem, menuitemcheckbox (with aria-checked) or menuitemradio.

On this page