Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
A menu of actions that blooms from its trigger.
npx shadcn@latest add ikislay/pixel-ui/dropdown-menuimport { DropdownMenu } from "@/components/ui/dropdown-menu"export function Demo() {return (<DropdownMenutrigger={<button type="button">Options</button>}items={[{ label: "Rename", onSelect: () => console.log("rename") },"separator",{ label: "Delete", destructive: true },]}/>)}
1// Loading…
Options you can pass to customize this component.
trigger*ReactElementOne focusable element that toggles the menu.
items*({ label: ReactNode; icon?: ReactNode; shortcut?: string; onSelect?: () => void; destructive?: boolean; disabled?: boolean } | "separator")[]The actions, in order. A separator draws a thin line; destructive turns an action red.
alignstartendWhich edge of the trigger the menu lines up with.
onFeedback(event: "open" | "close" | "select") => voidCalled at each semantic moment, for wiring sound or haptics.
classNamestringMerged onto the menu.