A popover action menu with a proximity-driven morphing highlight. The muted hover highlight springs between items as the pointer moves, giving the menu a fluid, alive feel.
Dependencies
Interaction Type
Click the trigger to open. Hover or use arrow keys to navigate items. The highlight morphs between items with spring physics.
Props
Options you can pass to customize this component.
openControlled open state.
defaultOpenInitial open state for uncontrolled usage. Defaults to false.
onOpenChangeCalled when the menu opens or closes.
classNameAdditional classes for the container.
Installation
How to use
import {
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
} from "@/components/ui/dropdown-menu"
export function Demo() {
return (
<DropdownMenu>
<DropdownMenuTrigger>Actions</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Edit</DropdownMenuItem>
<DropdownMenuItem>Duplicate</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem destructive>Delete</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
}Source Code
Click the code icon in the top-right corner to view the source code.
License & Usage
// No code loaded.