About
A toggleable contextual menu that opens from a trigger element to show a list of actions, links, checkboxes or radio options.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dropdown Menu to your project and fits it to your theme.
Code
How Dropdown Menu is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import React from "react";
import {
Dropdown,
DropdownTrigger,
DropdownMenu,
DropdownItem,
DropdownSeparator,
} from "@/components/ui/dropdown";
export default function DropdownDemo() {
return (
<div className="flex min-h-[320px] w-full items-start justify-center bg-background p-16 text-foreground">
<Dropdown>
<DropdownTrigger>
<button
type="button"
className="inline-flex items-center gap-2 rounded-md border border-input bg-background px-4 py-2 text-sm font-medium shadow-sm hover:bg-accent"
>
<span>Account</span>
<svg
width="14"
height="14"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<polyline points="6 9 12 15 18 9" />
</svg>
</button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem onClick={() => console.log("profile")}>
Profile
</DropdownItem>
<DropdownItem onClick={() => console.log("settings")}>
Settings
</DropdownItem>
<DropdownItem onClick={() => console.log("billing")}>
Billing
</DropdownItem>
<DropdownSeparator />
<DropdownItem destructive onClick={() => console.log("logout")}>
Log out
</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
);
}







