Overview
This issue proposes adding a Dropdown Menu component to the navigation category of Animata.
A dropdown menu is one of the most commonly needed UI patterns in SaaS and web applications. Animata currently has no navigation dropdown — this fills that gap with a fully accessible, animated, copy-paste-ready component.
Component Details
File: animata/navigation/dropdown-menu.tsx
Category: Navigation
Type: Interactive component
Proposed Features
- Trigger button that opens and closes a dropdown panel below it
- Menu items with optional icon and label support
- Smooth open/close animation using framer-motion (opacity + translateY only)
- Keyboard navigation: Arrow Up/Down to move, Enter to select, Escape to close
- Click outside to close using a ref and useEffect mousedown listener
- Focus management: returns focus to trigger on Escape
- Fully accessible: aria-expanded, aria-haspopup, role="menu", role="menuitem"
- prefers-reduced-motion: animations disabled when user preference is set
- Mobile ready: tap to open and close
- Left and right alignment support via prop
Props API
interface MenuItem {
label: string;
icon?: React.ReactNode;
onClick?: () => void;
}
interface DropdownMenuProps {
items?: MenuItem[];
triggerLabel?: string;
align?: "left" | "right";
}
Overview
This issue proposes adding a Dropdown Menu component to the
navigationcategory of Animata.A dropdown menu is one of the most commonly needed UI patterns in SaaS and web applications. Animata currently has no navigation dropdown — this fills that gap with a fully accessible, animated, copy-paste-ready component.
Component Details
File:
animata/navigation/dropdown-menu.tsxCategory: Navigation
Type: Interactive component
Proposed Features
Props API