---
title: Dropdown Menu
description: Displays a menu to the user — such as a set of actions or functions — triggered by a button.

link:
  doc: https://kobalte.dev/docs/core/components/dropdown-menu
  api: https://kobalte.dev/docs/core/components/dropdown-menu#api-reference
---

<ComponentPreview name="dropdown-menu-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/dropdown-menu-demo.tsx

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

<StepItem>Copy and paste the following code into your project:</StepItem>

  <ComponentSourceTabs>

    ```tsx title="components/ui/dropdown-menu" file=<rootDir>/apps/docs/src/registry/ui/dropdown-menu.tsx

    ```

    ```tsx title="components/ui/dropdown-menu" file=<rootDir>/apps/unocss-playground/src/registry/ui/dropdown-menu.tsx

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuPortal,
  DropdownMenuTrigger,
} from "@components/ui/dropdown-menu"
```

```tsx
<DropdownMenu>
  <DropdownMenuTrigger />
  <DropdownMenuPortal>
    <DropdownMenuContent>
      <DropdownMenuItem />
    </DropdownMenuContent>
  </DropdownMenuPortal>
</DropdownMenu>
```
