Brand Guide

Components

Dropdown menu

A list of actions that opens from a button.

Default

Items with icons, one disabled, and a destructive item kept apart by a separator.

Groups, labels and shortcuts

A shortcut sits at the end of its row in muted text.

Checkbox items

Radio items

Opens beside its row, level with it, on hover or with the right arrow key.

Placement

A menu opens below its trigger, centred. side and align change that.

Best practices

  • Draw the trigger as a button with render. An icon-only trigger needs an aria-label.
  • Choosing an item closes the menu, and that includes ticking a checkbox item or picking a radio item.
  • The arrow keys stop at the first and last item. They do not wrap round.
  • Put a DropdownMenuLabel inside a DropdownMenuGroup or DropdownMenuRadioGroup and it names that group for screen readers. Outside a group it is plain text.
  • Near the edge of the screen a menu flips to the opposite side, or slides along its trigger and keeps its alignment. To lift one above another layer, pass a z-index as positionerClassName, not in className.