Dropdown Menu

Animated dropdown menu with spring animations, nested submenus, and full keyboard navigation.

Open in v0

Last updated: March 29, 2026

Installation

npx smoothui-cli add dropdown-menu

Features

  • Spring-animated open/close with scale and fade
  • Nested submenu support with animated sub-content
  • Full keyboard navigation (Arrow keys, Enter, Escape)
  • Destructive variant for dangerous actions
  • Keyboard shortcut display
  • Separator and group label support
  • Wraps Radix UI Dropdown Menu for robust accessibility

Accessibility

Keyboard Interactions

KeyDescription
Enter / SpaceOpens the dropdown when trigger is focused, or activates the focused item
EscapeCloses the dropdown and returns focus to the trigger
Arrow DownMoves focus to the next item
Arrow UpMoves focus to the previous item
Arrow RightOpens a submenu when focused on a sub-trigger
Arrow LeftCloses a submenu and returns focus to the parent

ARIA Attributes

AttributeElementPurpose
role="menu"ContentIdentifies the dropdown as a menu
role="menuitem"ItemIdentifies each item as a menu item
aria-expandedTriggerIndicates whether the dropdown is open
aria-haspopupTriggerIndicates the trigger opens a menu

Reduced Motion

This component respects prefers-reduced-motion via useReducedMotion from Motion. When reduced motion is preferred, all spring animations (open/close, item stagger, submenu reveal) are disabled instantly.

Props