# DropdownMenu

Menu that displays when triggered by a button or element

## Example

## DropdownMenu

Menu that displays when triggered by a button or element

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `dir` | `enum` |  | - | - |
| `open` | `boolean` |  | - | - |
| `defaultOpen` | `boolean` |  | - | - |
| `onOpenChange` | `((open: boolean) => void)` |  | - | - |
| `modal` | `boolean` |  | - | - |

### Usage

```tsx
import { DropdownMenu } from '@databricks/appkit-ui';

```

## DropdownMenuCheckboxItem

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `onSelect` | `((event: Event) => void)` |  | - | - |
| `asChild` | `boolean` |  | - | - |
| `disabled` | `boolean` |  | - | - |
| `checked` | `CheckedState` |  | - | - |
| `onCheckedChange` | `((checked: boolean) => void)` |  | - | - |
| `textValue` | `string` |  | - | - |

### Usage

```tsx
import { DropdownMenuCheckboxItem } from '@databricks/appkit-ui';

```

## DropdownMenuContent

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |
| `forceMount` | `true` |  | - | Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. |
| `onEscapeKeyDown` | `((event: KeyboardEvent) => void)` |  | - | - |
| `onPointerDownOutside` | `((event: PointerDownOutsideEvent) => void)` |  | - | - |
| `onFocusOutside` | `((event: FocusOutsideEvent) => void)` |  | - | - |
| `onInteractOutside` | `((event: FocusOutsideEvent \| PointerDownOutsideEvent) => void)` |  | - | - |
| `onCloseAutoFocus` | `((event: Event) => void)` |  | - | Event handler called when auto-focusing on close. Can be prevented. |
| `loop` | `boolean` |  | - | Whether keyboard navigation should loop around @defaultValue false |
| `align` | `enum` |  | - | - |
| `side` | `enum` |  | - | - |
| `sideOffset` | `number` |  | - | - |
| `alignOffset` | `number` |  | - | - |
| `arrowPadding` | `number` |  | - | - |
| `avoidCollisions` | `boolean` |  | - | - |
| `collisionBoundary` | `Boundary \| Boundary[]` |  | - | - |
| `collisionPadding` | `number \| Partial<Record<"left" \| "right" \| "top" \| "bottom", number>>` |  | - | - |
| `sticky` | `enum` |  | - | - |
| `hideWhenDetached` | `boolean` |  | - | - |
| `updatePositionStrategy` | `enum` |  | - | - |

### Usage

```tsx
import { DropdownMenuContent } from '@databricks/appkit-ui';

```

## DropdownMenuGroup

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |

### Usage

```tsx
import { DropdownMenuGroup } from '@databricks/appkit-ui';

```

## DropdownMenuItem

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `onSelect` | `((event: Event) => void)` |  | - | - |
| `asChild` | `boolean` |  | - | - |
| `disabled` | `boolean` |  | - | - |
| `textValue` | `string` |  | - | - |
| `inset` | `boolean` |  | - | - |
| `variant` | `enum` |  | `default` | - |

### Usage

```tsx
import { DropdownMenuItem } from '@databricks/appkit-ui';

```

## DropdownMenuLabel

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |
| `inset` | `boolean` |  | - | - |

### Usage

```tsx
import { DropdownMenuLabel } from '@databricks/appkit-ui';

```

## DropdownMenuPortal

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `container` | `Element \| DocumentFragment \| null` |  | - | Specify a container element to portal the content into. |
| `forceMount` | `true` |  | - | Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. |

### Usage

```tsx
import { DropdownMenuPortal } from '@databricks/appkit-ui';

```

## DropdownMenuRadioGroup

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |
| `value` | `string` | ✓ | - | - |
| `onValueChange` | `((value: string) => void)` |  | - | - |

### Usage

```tsx
import { DropdownMenuRadioGroup } from '@databricks/appkit-ui';

```

## DropdownMenuRadioItem

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `onSelect` | `((event: Event) => void)` |  | - | - |
| `asChild` | `boolean` |  | - | - |
| `disabled` | `boolean` |  | - | - |
| `value` | `string` | ✓ | - | - |
| `textValue` | `string` |  | - | - |

### Usage

```tsx
import { DropdownMenuRadioItem } from '@databricks/appkit-ui';

```

## DropdownMenuSeparator

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |

### Usage

```tsx
import { DropdownMenuSeparator } from '@databricks/appkit-ui';

```

## DropdownMenuShortcut

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

This component extends standard HTML element attributes.

### Usage

```tsx
import { DropdownMenuShortcut } from '@databricks/appkit-ui';

```

## DropdownMenuSub

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

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

### Usage

```tsx
import { DropdownMenuSub } from '@databricks/appkit-ui';

```

## DropdownMenuSubContent

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |
| `forceMount` | `true` |  | - | Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. |
| `onEscapeKeyDown` | `((event: KeyboardEvent) => void)` |  | - | - |
| `onPointerDownOutside` | `((event: PointerDownOutsideEvent) => void)` |  | - | - |
| `onFocusOutside` | `((event: FocusOutsideEvent) => void)` |  | - | - |
| `onInteractOutside` | `((event: FocusOutsideEvent \| PointerDownOutsideEvent) => void)` |  | - | - |
| `loop` | `boolean` |  | - | Whether keyboard navigation should loop around @defaultValue false |
| `sideOffset` | `number` |  | - | - |
| `alignOffset` | `number` |  | - | - |
| `arrowPadding` | `number` |  | - | - |
| `avoidCollisions` | `boolean` |  | - | - |
| `collisionBoundary` | `Boundary \| Boundary[]` |  | - | - |
| `collisionPadding` | `number \| Partial<Record<"left" \| "right" \| "top" \| "bottom", number>>` |  | - | - |
| `sticky` | `enum` |  | - | - |
| `hideWhenDetached` | `boolean` |  | - | - |
| `updatePositionStrategy` | `enum` |  | - | - |

### Usage

```tsx
import { DropdownMenuSubContent } from '@databricks/appkit-ui';

```

## DropdownMenuSubTrigger

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |
| `disabled` | `boolean` |  | - | - |
| `textValue` | `string` |  | - | - |
| `inset` | `boolean` |  | - | - |

### Usage

```tsx
import { DropdownMenuSubTrigger } from '@databricks/appkit-ui';

```

## DropdownMenuTrigger

**Source:** [`packages/appkit-ui/src/react/ui/dropdown-menu.tsx`](https://github.com/databricks/appkit/blob/main/packages/appkit-ui/src/react/ui/dropdown-menu.tsx)

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `asChild` | `boolean` |  | - | - |

### Usage

```tsx
import { DropdownMenuTrigger } from '@databricks/appkit-ui';

```
