Install
Pull Dropdown Menu from the barrel for everyday use, or the granular path when you want a tighter bundle.
import { DropdownMenu } from "@brika/clay";import { DropdownMenu } from "@brika/clay/components/dropdown-menu";A minimal example
Drop this into a page. Native HTML attributes pass through to the underlying primitive.
'use client';
import { LogOut, Settings, User } from 'lucide-react';
import { Button } from '@brika/clay/components/button';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@brika/clay/components/dropdown-menu';
/** Action menu with icons, grouped items, a separator, and a destructive item. */
export default function DropdownMenuDefaultDemo() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline">Account</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-48">
<DropdownMenuLabel>My account</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
<User />
Profile
</DropdownMenuItem>
<DropdownMenuItem>
<Settings />
Settings
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuItem variant="destructive">
<LogOut />
Log out
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
);
}Dropdown Menu, every way
Checkbox
DropdownMenuCheckboxItem toggles boolean view preferences and persists checked state.
Radio
DropdownMenuRadioGroup enforces a single active selection across a set of items.
Shortcuts
DropdownMenuShortcut renders right-aligned keyboard hints, purely visual, not functional.
Accessibility
- Arrow keys navigate items; Enter/Space activate; Escape closes and returns focus to the trigger.
- Checkbox items carry
aria-checked; radio items carryaria-checkedwithin arole="group". -
DropdownMenuShortcutrenders keyboard hints, these are visual only and not announced by AT. - Destructive items should use
variant="destructive"to make intent clear visually and in context.
API reference
Props specific to Dropdown Menu. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.
<DropdownMenu />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuCheckboxItem />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuContent />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuGroup />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuItem />
2 props- booleanExtra leading padding to align with items that have icons.
- variantdefault
'default''default' | 'destructive'"default" or "destructive" treatment.
<DropdownMenuLabel />
1 prop- booleanExtra leading padding to align with items that have icons.
<DropdownMenuPortal />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuRadioGroup />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuRadioItem />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuSeparator />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuShortcut />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuSub />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuSubContent />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<DropdownMenuSubTrigger />
1 prop- booleanExtra leading padding to align with items that have icons.
<DropdownMenuTrigger />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.