# Dropdown

> Friendlier aliases over Menu — DropdownTrigger, DropdownMenu, DropdownItem.

Registry name: `dropdown`. HTML docs: https://ui.anuragroy.dev/component/dropdown.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/dropdown.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/dropdown.json`.

Registry JSON: https://ui.anuragroy.dev/r/dropdown.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/dropdown.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import {
  Dropdown,
  DropdownItem,
  DropdownMenu,
  DropdownSeparator,
  DropdownTrigger
} from "@/components/ui/dropdown"
```

## Usage

```tsx
import { Button } from "@/components/ui/button"
import {
  Dropdown,
  DropdownItem,
  DropdownMenu,
  DropdownSeparator,
  DropdownTrigger,
} from "@/components/ui/dropdown"

export function Example() {
  return (
    <Dropdown>
      <DropdownTrigger render={<Button variant="outline" />}>
        Open
      </DropdownTrigger>
      <DropdownMenu>
        <DropdownItem>Profile</DropdownItem>
        <DropdownItem>Settings</DropdownItem>
        <DropdownSeparator />
        <DropdownItem>Log out</DropdownItem>
      </DropdownMenu>
    </Dropdown>
  )
}
```

## API

### Dropdown

Re-exports the Menu root under a shorter name.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `open` | boolean | — |  |
| `onOpenChange` | (open: boolean) => void | — |  |

## Notes

- Installing `dropdown` also installs `menu`. Prefer `dropdown` for typical menus.

## See also

- [HTML page](https://ui.anuragroy.dev/component/dropdown): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/dropdown.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
