Components
Dropdown Menu
A small anchored action menu for contextual actions, overflow controls, and compact options.
Loading...
Installation
Install the registry item directly, then add any package dependencies if you are setting the component up manually.
1
Install the component
Run the registry command below to add dropdown-menu to your project.
watermelon add dropdown-menu2
Import the component
Import Dropdown Menu from your local UI registry output.
Import
import { DropdownMenu } from "@/components/ui/dropdown-menu";Import
Import
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";Usage
Dropdown menus work well for overflow actions that should stay anchored to a trigger.
Loading...
API Reference
| prop | type | default | description |
|---|---|---|---|
| open / defaultOpen | boolean | false | Controls whether the menu is visible. |