Dropdown Menu
ActionsOpens a compact menu of actions or stateful choices from a visible trigger.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/dropdown-menu.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes button, icon, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/dropdown-menu.json https://luv-jeri.github.io/cojeev-ui/r/button.json https://luv-jeri.github.io/cojeev-ui/r/icon.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing dropdown menu
Items show stable, varied blob adornments by default. Set adornment={false} to hide, supply {shape,color,icon,effect}, or pass a custom icon element.
Use DropdownMenuTrigger with a named button and place related commands in the content.
Compose checkbox items, radio groups, separators, or submenus to match the action structure.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
DropdownMenuProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuPortalProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuGroupProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuRadioGroupProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuSubProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuTriggerProps
| Prop | Type | Required |
|---|---|---|
chevron | boolean | No |
DropdownMenuContentProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuSubContentProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuItemProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | "danger" | No |
inset | boolean | No |
DropdownMenuSubTriggerProps
| Prop | Type | Required |
|---|---|---|
inset | boolean | No |
DropdownMenuCheckboxItemProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuRadioItemProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuLabelProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuSeparatorProps
Accepts the native or primitive props declared by its exported TypeScript type.
DropdownMenuShortcutProps
Accepts the native or primitive props declared by its exported TypeScript type.
Accessibility
Preserve the supplied trigger and item primitives for keyboard navigation and focus return.
Use concise item labels and expose destructive consequences in text when necessary.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.