Skip to content
Protocore Design Systemv1.6.9

/// Overlay

DropdownMenu

A menu of actions opened from a button — items, checkboxes, radio groups, and nested submenus with full keyboard navigation.

import { DropdownMenu } from "@protocore/pds";
View as Markdown

Basics

DropdownMenu.Item takes a startIcon, an endHint (for a shortcut), and tone="danger" for destructive actions. DropdownMenu.Separator rules off a group.

Checkbox & radio items

CheckboxItem toggles independently (checked / onCheckedChange); RadioItem inside a RadioGroup is single-select (value / onValueChange). DropdownMenu.Label heads each section.

Submenus

Nest a DropdownMenu.Sub with a SubTrigger (shows a chevron) and SubContent. Submenus open on hover or on ArrowRight and keep full keyboard navigation.

When to use it

A DropdownMenu presents a list of commands or a set of toggles launched from a button — a row's overflow menu, a "⋯ Actions" control, a view/filter switcher. Items are actions (they do something on select), and the menu closes after a choice.

Don't confuse it with a [Select](/inputs/select): a Select edits a single form value and shows the current selection in its trigger; a DropdownMenu fires actions. For the same menu opened by right-click on a surface rather than a button, use [ContextMenu](/overlay/context-menu) — identical parts, different trigger. If you need arbitrary interactive content (a form, a slider) rather than a list of items, that's a [Popover](/overlay/popover).

Usage

Do

  • Use it for action lists and quick toggles launched from a button.
  • Group related items with DropdownMenu.Label and Separator.
  • Put shortcut hints in endHint so they align on the right.
  • Mark destructive items with tone="danger" and place them last.

Don't

  • Use it to set a form value — that's a Select.
  • Nest more than one level of submenu; deep trees are hard to navigate.
  • Fill items with arbitrary form controls — reach for a Popover.
  • Leave a danger item mid-list where it's easy to hit by accident.

Accessibility

KeysAction
Enter / SpaceOpens the menu from the trigger; activates the focused item.
↑ / ↓Moves focus between items (roving tabindex).
Opens a submenu from its SubTrigger.
Closes the current submenu, returning to its trigger.
Home / EndJumps to the first / last item.
A–ZTypeahead — jumps to the next item starting with the typed character.
EscCloses the menu and returns focus to the trigger.
  • Roles from Radix: menu / menuitem / menuitemcheckbox / menuitemradio, correctly wired.
  • Focus is trapped in the open menu and restored to the trigger on close.
  • Checkbox and radio items expose their checked state to assistive tech.
  • Icons in items are decorative; the label carries the accessible name.

DropdownMenu.Content props

PropTypeDefaultDescription
asChildboolean
classNamestring
styleCSSProperties

DropdownMenu.Item props

PropTypeDefaultDescription
asChildboolean
classNamestring
endHintReactNodeOptional trailing hint (shortcut, chevron).
startIconReactNodeOptional leading icon slot.
styleCSSProperties
toneenumneutralSet `"danger"` to render a destructive item (danger-fg text).

Related

  • ContextMenuA right-click (or long-press) menu opened at the pointer — the same item vocabulary as DropdownMenu, bound to a surface.
  • PopoverA non-modal floating panel anchored to a trigger — for secondary controls, filters, and rich detail that shouldn't block the page.
  • SelectInput-styled trigger plus an overlay panel for choosing one value from a list; flat or compound API.
  • ButtonThe system action control — mono uppercase label, sharp corners, and a primary fill that inverts on hover.