Dropdown
dropdownA menu of actions revealed from a trigger. Grouped, with labels, a destructive variant, checkbox items, and full keyboard and typeahead support from the Base UI menu primitive — Forme adds only the surface and the motion.
import {
Dropdown,
DropdownCheckboxItem,
DropdownContent,
DropdownGroup,
DropdownItem,
DropdownLabel,
DropdownSeparator,
DropdownTrigger,
} from "@/components/forme/dropdown/dropdown";
import { Check, LogOut, Pencil, Trash2, User } from "lucide-react";
export function DropdownDemo() {
return (
<div className="flex flex-wrap items-start gap-6">
<Dropdown>
<DropdownTrigger>Account</DropdownTrigger>
<DropdownContent>
<DropdownItem>
<User aria-hidden className="size-4 text-muted-foreground" />
Profile
</DropdownItem>
<DropdownItem>
<Pencil aria-hidden className="size-4 text-muted-foreground" />
Rename
</DropdownItem>
<DropdownItem>
<LogOut aria-hidden className="size-4 text-muted-foreground" />
Sign out
</DropdownItem>
</DropdownContent>
</Dropdown>
<Dropdown>
<DropdownTrigger>Groups and state</DropdownTrigger>
<DropdownContent>
<DropdownGroup>
<DropdownLabel>Visibility</DropdownLabel>
<DropdownCheckboxItem icon={<Check className="size-3" />} checked>
Published
</DropdownCheckboxItem>
<DropdownCheckboxItem icon={<Check className="size-3" />}>Draft</DropdownCheckboxItem>
</DropdownGroup>
<DropdownSeparator />
<DropdownGroup>
<DropdownLabel>Danger zone</DropdownLabel>
<DropdownItem destructive>
<Trash2 aria-hidden className="size-4" />
Delete project
</DropdownItem>
</DropdownGroup>
</DropdownContent>
</Dropdown>
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
Usage
import {
Dropdown, DropdownContent, DropdownItem, DropdownTrigger,
} from "@/components/forme/dropdown/dropdown";
<Dropdown>
<DropdownTrigger>Options</DropdownTrigger>
<DropdownContent align="end">
<DropdownItem onClick={rename}>Rename</DropdownItem>
<DropdownItem destructive onClick={remove}>Delete</DropdownItem>
</DropdownContent>
</Dropdown>When to use
Reach for it
- A short list of actions behind one trigger: a row's options, an account menu.
- Toggling options with
DropdownCheckboxItem.
Use something else
- Choosing a value for a form field — that is a
Select. - Searching a long list of commands; use the
CommandMenu.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
DropdownTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | — | Render as the single child element instead of a <button>, keeping the trigger behaviour. |
Also takes every prop of Base UI Menu.Trigger.
DropdownItem
| Prop | Type | Default | Description |
|---|---|---|---|
destructive | boolean | — | Renders destructive: a red item for an action that cannot be undone. |
Also takes every prop of Base UI Menu.Item.
DropdownCheckboxItem
| Prop | Type | Default | Description |
|---|---|---|---|
icon | React.ReactNode | — | Shown in the indicator slot when the item is checked. |
Also takes every prop of Base UI Menu.CheckboxItem.
The other parts
DropdownTakes Base UIMenu.RootDropdownContentTakes Base UIMenu.PopupandPick<ComponentProps<typeof MenuPrimitive.Positioner>, "side" | "sideOffset" | "align">DropdownLabelTakes Base UIMenu.GroupLabelDropdownGroupTakes Base UIMenu.GroupDropdownSeparatorTakes Base UIMenu.Separator
Accessibility
- Base UI handles roving focus, typeahead,
aria-expandedand Esc, and returns focus to the trigger. - A
destructiveitem is coloured and still announced by its label, so the meaning never rests on colour alone.
Motion
- The menu grows from its trigger (
--transform-origin) with a slight scale and blur, and exits faster than it enters.
Responsive behaviour
- It is portalled and repositions to stay on screen near the edges.
Related


Dialog
A modal built on the Base UI primitive, so the focus trap, the inert background, Esc to close and the return of focus all come from one well tested place. The backdrop fades and the panel scales in, both in and out, and everything comes from the foundation tokens.
overlays

Drawer
A bottom sheet on the Base UI dialog, so it keeps the focus trap, Esc and focus return. Drag it down by the handle or header and it follows your finger, then springs back or closes when pulled past a third of its height or flicked.
overlays

Lightbox
A photo gallery whose thumbnails fly into a full-screen viewer and back again. Arrow keys, a thumbnail strip and swipe move between photos, and it is a Base UI dialog underneath, so focus is trapped and returns to the thumbnail you opened.
overlays