Oros UI

Search documentation

Search Oros UI pages and components.

Dropdown Menu

Shows a menu of actions from a trigger.

Installation

Install Dropdown Menu from Oros with shadcn CLI 4.13.0.

pnpm dlx shadcn@4.13.0 add @oros/dropdown-menu

Usage

import {
  DropdownMenu,
  DropdownMenuPortal,
  DropdownMenuTrigger,
  DropdownMenuContent,
  DropdownMenuGroup,
  DropdownMenuLabel,
} from "@/components/ui/dropdown-menu"

Open the Source tab in the preview for a complete working example.

Anatomy

ExportResponsibility
DropdownMenuThe root component that owns the primary structure and state.
DropdownMenuPortalMoves overlay content to a stable document layer.
DropdownMenuTriggerControls opening, selection, or disclosure behavior.
DropdownMenuContentContains the primary visible content.
DropdownMenuGroupGroups related items into one logical set.
DropdownMenuLabelProvides a visible label for its related control or value.
DropdownMenuItemRepresents one option or repeated child.
DropdownMenuCheckboxItemRepresents one option or repeated child.
DropdownMenuRadioGroupGroups related items into one logical set.
DropdownMenuRadioItemRepresents one option or repeated child.
DropdownMenuSeparatorVisually and semantically separates related groups.
DropdownMenuShortcutA composable part of the component anatomy.
DropdownMenuSubA composable part of the component anatomy.
DropdownMenuSubTriggerControls opening, selection, or disclosure behavior.
DropdownMenuSubContentContains the primary visible content.

API Reference

Dropdown Menu exports 15 named entries. Component exports accept the props of their underlying HTML element or Base UI component, plus an optional className, unless the source defines a more focused type.

  • DropdownMenu Component
  • DropdownMenuPortal Component
  • DropdownMenuTrigger Component
  • DropdownMenuContent Component
  • DropdownMenuGroup Component
  • DropdownMenuLabel Component
  • DropdownMenuItem Component
  • DropdownMenuCheckboxItem Component
  • DropdownMenuRadioGroup Component
  • DropdownMenuRadioItem Component
  • DropdownMenuSeparator Component
  • DropdownMenuShortcut Component
  • DropdownMenuSub Component
  • DropdownMenuSubTrigger Component
  • DropdownMenuSubContent Component

Accessibility

  • Dropdown Menu inherits focus management and keyboard support from Base UI; keep the provided trigger and content parts together.
  • Give icon-only triggers an accessible name, retain visible focus styles, and verify Escape and focus-return behavior in the final composition.

Source

Dropdown Menu uses the standard shadcn API and is distributed through Oros. Installing it adds the component source and required dependencies to your app. The Source tab above shows a complete usage example.

Migrating from COSS? Install dropdown-menu in place of menu.