dropdown API
overlays/dropdown.tsx
Dropdown
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger* | React.ReactElement | — | Element the menu anchors to. Receives the ARIA wiring plus click/arrow-key handlers that open the menu. |
items* | {} | — | Menu entries in order; the string `'separator'` renders a divider. |
align | Align | undefined | start | Alignment along the trigger. |
side | Side | undefined | bottom | Preferred side of the trigger (flips when there is no room). |
sideOffset | number | undefined | 4 | Gap between trigger and menu, in px. |
open | boolean | undefined | — | Controlled open state. |
Show native HTML props
Native HTML Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | undefined | — | |
defaultOpen | boolean | undefined | false | Initial open state for uncontrolled usage. |
onOpenChange | ((open: boolean) => void) | undefined | — |