When To Use
- Use Dropdown Menu when content needs to appear in context without forcing a full page transition.
- Match the overlay type to the weight of the task: lightweight guidance for hints, stronger containment for focused tasks.
- Review the examples below to compare trigger styles, content density, and dismissal expectations.
When Not To Use
- Do not move a full workflow into an overlay if the user needs persistent navigation, rich context, or deep editing space.
- Do not rely on an overlay for critical messaging when it can be missed, dismissed accidentally, or blocked by focus issues.
Accessibility Notes
- Move focus into the overlay when it opens and return focus to the trigger when it closes.
- Support Escape to dismiss non-destructive overlays and ensure the trigger communicates expanded state where appropriate.
- Do not hide critical actions behind hover-only disclosure; keyboard and touch users need equivalent access.
Key Props / API
Key exports
DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem
Example Code
import {
DropdownMenu, DropdownMenuTrigger, DropdownMenuContent,
DropdownMenuItem, DropdownMenuSeparator,
} from "@hilum/ui"
import { Button } from "@hilum/ui"
import { ChevronDown } from "lucide-react"
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline">Options <ChevronDown size={14} /></Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Account settings</DropdownMenuItem>
<DropdownMenuItem>Support</DropdownMenuItem>
<DropdownMenuItem>License</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>Sign out</DropdownMenuItem>
</DropdownMenuContent>
// ...trimmed for docsDropdown Menu · Variants
Simple
Button trigger with plain text items
With dividers
Items grouped by separators
With icons
Leading icon per item
Minimal icon trigger
Dots-vertical button — no label
With simple header
Account info header above items
Dropdown Menu · With extras
Context actions
Label, shortcuts, and destructive item