A pull down menu with morphing animations. The trigger morphs into the menu container, creating a fluid, native-feeling interaction with spring physics. Features submenus, directional expansion, and full keyboard navigation.
Inspired by and adapted from bloom-menu by Josh Puckett. Licensed under MIT.
import { PullDown } from "@/components/ui/animated/pull-down"<PullDown direction="top" anchor="start">
<PullDown.Container
buttonSize={40}
menuWidth={160}
menuRadius={12}
className="bg-white dark:bg-neutral-800"
>
<PullDown.Trigger>
<DotsThreeIcon className="h-5 w-5" weight="bold" />
</PullDown.Trigger>
<PullDown.Content className="p-1">
<PullDown.Item onSelect={() => {}}>Edit</PullDown.Item>
<PullDown.Item onSelect={() => {}}>Copy</PullDown.Item>
<PullDown.Item onSelect={() => {}}>Share</PullDown.Item>
<PullDown.Separator />
<PullDown.Item onSelect={() => {}}>Archive</PullDown.Item>
</PullDown.Content>
</PullDown.Container>
</PullDown>The simplest pull down menu with icon trigger and items.
Add leading icons to menu items for better visual context.
Use a rectangular button with text as the trigger by providing a buttonSize object with width and height.
Create nested navigation using SubMenu, SubMenuTrigger, and SubMenuContent. The submenu morphs from the trigger position with a scaled container effect.
Root container that provides state and configuration context.
The morphing container that transitions from button to menu.
The trigger element that opens the menu. Fades out when menu opens.
Container for menu items with animated entrance.
Interactive menu item with hover highlighting.
Wrapper for nested submenu functionality.
The item that opens a submenu. Supports render prop for active state.
Full keyboard navigation and ARIA support for accessible menu interactions.
role="button", aria-expanded, and aria-haspopup="menu"role="menu"role="menuitem" with aria-disabledprefers-reduced-motion media query