AI Primitives

Components / Primitives / Dropdown Menu

Dropdown Menu

Menus with actions, radio and checkbox items, shortcuts and destructive states.

Installation

Install the Dropdown Menu React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):

npx shadcn@latest add @ai-primitive/dropdown-menu

Usage

import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator } from "@/components/ui/dropdown-menu"

Related components

  • Button - Core button with six variants and sizes down to icon-only.
  • Copy Button - Icon button that copies text to the clipboard and confirms with a checkmark.
  • Code Block - Syntax-highlighted code block with a language label and a built-in copy button.
  • Dialog - A modal for focused tasks and confirmations - centered on larger screens, a bottom sheet on phones.
  • Tooltip - Labels for icon-only controls, with shared delays so a row of buttons reads quickly.
  • Switch - An on/off toggle for settings that take effect immediately.

Previous: Dialog · Next: Tooltip