Dropdown Menu
Displays a menu to the user — such as a set of actions or functions — triggered by a button.
Installation
pnpm dlx shadcn@latest add https://reui.io/r/dropdown-menu.json
Examples
Default
Checkbox
Radio Group
API Reference
This component is built using Radix UI Dropdown Menu primitives. For detailed information, please visit the full API reference.
DropdownMenu
This component is based on the DropdownMenu.Root primitive. For more details, refer to the original documentation.
DropdownMenuTrigger
This component is based on the DropdownMenu.Trigger primitive. For more details, refer to the original documentation.
DropdownMenuGroup
This component is based on the DropdownMenu.Group primitive. For more details, refer to the original documentation.
DropdownMenuPortal
This component is based on the DropdownMenu.Portal primitive. For more details, refer to the original documentation.
DropdownMenuSub
This component is based on the DropdownMenu.Sub primitive. For more details, refer to the original documentation.
DropdownMenuRadioGroup
This component is based on the DropdownMenu.RadioGroup primitive. For more details, refer to the original documentation.
DropdownMenuSubTrigger
This component is based on the DropdownMenu.SubTrigger primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
inset | ||
className |
DropdownMenuSubContent
This component is based on the DropdownMenu.SubContent primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
className |
DropdownMenuContent
This component is based on the DropdownMenu.Content primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
sideOffset | ||
className |
DropdownMenuItem
This component is based on the DropdownMenu.Item primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
inset | ||
variant | ||
className |
DropdownMenuCheckboxItem
This component is based on the DropdownMenu.CheckboxItem primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
checked | ||
className |
DropdownMenuRadioItem
This component is based on the DropdownMenu.RadioItem primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
className |
DropdownMenuLabel
This component is based on the DropdownMenu.Label primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
inset | ||
className |
DropdownMenuSeparator
This component is based on the DropdownMenu.Separator primitive and includes the following custom props:
Prop | Type | Default |
---|---|---|
className |
DropdownMenuShortcut
This component is a custom implementation that displays keyboard shortcuts next to menu items.
Prop | Type | Default |
---|---|---|
className |