Dropdown Menu
A premium animated dropdown menu with spring physics and glassmorphism.
Preview
Interactive Preview
Installation
Usage
tsx
import { DropdownMenu } from "@/components/ui/dropdown-menu"
import { Button } from "@/components/ui/button"
export default function Demo() {
const items = [
{ label: "Profile", icon: "solar:user-bold", onClick: () => console.log("Profile") },
{ label: "Settings", icon: "solar:settings-bold", shortcut: "⌘S" },
{ label: "Logout", icon: "solar:logout-bold", variant: "destructive" }
]
return (
<DropdownMenu
trigger={<Button>Open Menu</Button>}
items={items}
/>
)
}Dependencies
framer-motion@iconify/react
Props
| Prop | Type | Default |
|---|---|---|
| trigger | ReactNode | - |
| items | array | - |
| align | "left""right""center" | right |