Skip to content
Cojeev UI

Dropdown Menu

Actions

Opens a compact menu of actions or stateful choices from a visible trigger.

React · copy into your project · light and dark themes

Try it

Loading preview…

Take it with you

Copy the example, API and usage notes for your editor or AI assistant.

Add to your project

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/dropdown-menu.json

The 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:

Terminal
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.json

Using 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

PropTypeRequired
chevronbooleanNo

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

PropTypeRequired
variant"default" | "danger"No
insetbooleanNo

DropdownMenuSubTriggerProps

PropTypeRequired
insetbooleanNo

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

openresthoverfocusactive

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.