Dropdown

Menu of actions revealed from a trigger

Category: overlay · WCAG 2.2-AA · overlay, menu, actions

States

Props

PropTypeDefaultDescription
triggerReactElementThe element that opens the dropdown when activated.
items({ label: string; value: string; icon?: ReactNode; disabled?: boolean } | { kind: 'separator' })[]Menu entries. A selectable row is `{ label, value, icon?, disabled? }`; a rule between groups is `{ kind: 'separator' }`, which takes no label or value. The union is tagged on `kind`, so a separator cannot carry data that would be silently discarded.
onSelect(value: string) => voidCalled with the selected value.
placement'bottom-start' | 'bottom-end'bottom-startWhich trigger edge the menu aligns to. `bottom-start` hangs it from the trigger's start edge, `bottom-end` from its end edge — use `bottom-end` for a trigger near the end of the viewport.
openbooleanWhether the component is open (controlled).
onOpenChange(open: boolean) => voidCalled with the next open state when it changes.

Design tokens

When to use

When not to use

How to build an accessible Dropdown in React →

Examples

Basic

<Dropdown trigger={<Button>Actions</Button>} items={[{ label: "Edit", value: "edit" }]} onSelect={handle} />

Related components

← Back to docs