RRezi UI

Dropdown Menu

Menu of actions and options with checkbox and radio items, built on Radix Dropdown Menu.

Opens like the Popover and shares its surface. Item highlight is instant: it changes on every pointer move, so an animation would only add lag. When the menu is driven from the keyboard, the highlighted item also gets a 2px ring — the subtle fill alone is too faint to follow.

Installation

npx shadcn@latest add @reziui/dropdown-menu

Usage

app/page.tsx
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";

export function Example() {
  return (
    <DropdownMenu>
      <DropdownMenuTrigger asChild>
        <Button variant="secondary">Open</Button>
      </DropdownMenuTrigger>
      <DropdownMenuContent>
        <DropdownMenuItem>Rename</DropdownMenuItem>
        <DropdownMenuItem variant="destructive">Delete</DropdownMenuItem>
      </DropdownMenuContent>
    </DropdownMenu>
  );
}

Examples

Checkbox and radio items

Text starts at the same 32px in every item, so icon, checkbox and radio items line up in one menu. Give icon-only triggers an aria-label.

Keyboard

KeyAction
Enter Space ↓Open the menu from the trigger.
↑ ↓Move between items, skipping disabled ones.
Enter SpaceSelect the highlighted item.
EscClose and return focus to the trigger.

API reference

ComponentNotes
DropdownMenuContent208px minimum. side, align, sideOffset (default 6). Scrolls when the viewport is short.
DropdownMenuItemvariant="default" | "destructive", disabled, onSelect.
DropdownMenuCheckboxItemchecked, onCheckedChange.
DropdownMenuRadioGroup / DropdownMenuRadioItemvalue, onValueChange on the group; value on each item.
DropdownMenuLabel · DropdownMenuSeparator · DropdownMenuGroupStructure.
DropdownMenuShortcutTrailing keyboard hint — display only, bind the shortcut yourself.

Submenus are not included yet.