Dropdown Menu Open a menu of actions from a button. Compare how the menu aligns with its trigger on each side.
On this pageUsage guidelines Use a menu for a group of commands. Place a group label inside DropdownMenuGroup beside the items it describes.
Use DropdownMenuCheckboxItem for a setting that remains independent of the other items, or DropdownMenuRadioGroup for one choice within the menu.
Anatomy <DropdownMenu>
<DropdownMenuTrigger />
<DropdownMenuContent>
<DropdownMenuGroup>
<DropdownMenuLabel />
<DropdownMenuItem />
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>Installation Set up your license key before connecting the private registry.
Connect this project to https://docs.interfacesds.com using the full URL shown below, including {name}. In components.json, add the registries field at the top level. If the field already exists, add only the @interfaces-ds entry inside it. Keep your existing aliases and other registries.
Next.js Vite
For a global stylesheet in app/ or src/app/.
JSON
Copy code Retry copy Copy code {
"registries" : {
"@interfaces-ds" : {
"url" : "https://docs.interfacesds.com/r/{name}.json" ,
"headers" : {
"Authorization" : "Bearer ${INTERFACES_DS_LICENSE_KEY}"
}
}
}
} Install the component.
Terminal
Copy command Retry copy Copy command npx shadcn@latest add @interfaces-ds/dropdown-menuTo run the usage example, install these components together.
Terminal
Copy command Retry copy Copy command npx shadcn@latest add @interfaces-ds/dropdown-menu @interfaces-ds/buttonAPI reference Import these exports from @/components/ui/dropdown-menu. The tables cover component-specific props and common controls.
DropdownMenu Prop Type Default defaultOpenboolean—disabledboolean—modalboolean—onOpenChange(open: boolean, eventDetails: DropdownMenuPrimitive.Root.ChangeEventDetails) => void—openboolean—orientation"horizontal" | "vertical"—
DropdownMenuPortal Prop Type Default forceMounttrue—keepMountedboolean—
DropdownMenuTrigger Prop Type Default asChildboolean—disabledboolean—namestring—type"button" | "submit" | "reset"—valuestring | number | readonly string[]—
DropdownMenuContent Prop Type Default forceMounttrue—
DropdownMenuGroup
DropdownMenuLabel Prop Type Default insetboolean—
DropdownMenuItem Prop Type Default asChildboolean—disabledboolean—insetboolean—labelstring—variant"default" | "danger""default"
DropdownMenuCheckboxItem Prop Type Default asChildboolean—checkedboolean—defaultCheckedboolean—disabledboolean—labelstring—onCheckedChange(checked: boolean, eventDetails: DropdownMenuPrimitive.CheckboxItem.ChangeEventDetails) => void—
DropdownMenuRadioGroup Prop Type Default disabledboolean—onValueChange(value: any, eventDetails: DropdownMenuPrimitive.RadioGroup.ChangeEventDetails) => void—
DropdownMenuRadioItem Prop Type Default asChildboolean—disabledboolean—labelstring—
DropdownMenuSeparator Prop Type Default orientation"horizontal" | "vertical"—
DropdownMenuShortcut
DropdownMenuSub Prop Type Default defaultOpenboolean—disabledboolean—onOpenChange(open: boolean, eventDetails: DropdownMenuPrimitive.SubmenuRoot.ChangeEventDetails) => void—openboolean—orientation"horizontal" | "vertical"—
DropdownMenuSubTrigger Prop Type Default asChildboolean—disabledboolean—insetboolean—labelstring—
DropdownMenuSubContent Prop Type Default forceMounttrue—