# Astryx Dropdown Menu Submenu

> A single menu row that reveals a nested flyout of its own items. The row adopts DropdownMenuItem semantics (label / icon / description / isDisabled); its children become the flyout content. Opens inline-end with viewport auto-flip; Right/Enter/Space opens and focuses the first item, Left/Escape closes and returns focus to the trigger (Right/Left swap in RTL). On a phone (a coarse pointer, decided when the menu opened) the row drills in instead: its rows replace the menu's rows in the same box, led by a Back row named "Back to <parent>", and Back, Escape or ArrowLeft return to the row. Host attributes and DOM event handlers (aria-*, data-*, id) reach the trigger row, the element carrying role="menuitem" and aria-haspopup="menu"; a caller's handlers run after the row's own, except for the keys that open the flyout (the open arrow, Enter, Space) and a click on a disabled row. For data-driven menus, give a menu item a nested `items` array instead of using this component directly.  Astryx by Meta. Source: https://astryx.atmeta.com/components/DropdownMenuSubMenu

- Author: [Astryx](https://21st.dev/@Astryxdesign)
- License: mit
- Tags: Menu, Navigation, Submenu
- npm dependencies: @astryxdesign/core, @astryxdesign/theme-neutral
- Live preview: https://21st.dev/@Astryxdesign/components/astryx-dropdown-menu-sub-menu

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/Astryxdesign/astryx-dropdown-menu-sub-menu?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/menu.md
