# Astryx Mobile Nav Toggle

> Hamburger button that opens/closes the mobile nav drawer. Reads open state from AppShell context automatically: does NOT accept isOpen or onOpenChange props. Renders nothing above the mobile breakpoint, without an AppShell mobile context (from AppShell, or an AppShellMobileContext you provide), or when AppShell has no mobile navigation (no side or top nav, mobileNav={false}, or a mobileNav node). Host attributes and DOM handlers (id, data-*, aria-*) reach the button; its aria-expanded and aria-controls stay component-owned, and a caller onClick runs after the toggle.  Astryx by Meta. Source: https://astryx.atmeta.com/components/MobileNavToggle

- Author: [Astryx](https://21st.dev/@Astryxdesign)
- License: mit
- Tags: Toggle, Navigation, Mobile
- npm dependencies: @astryxdesign/core, @astryxdesign/theme-neutral
- Live preview: https://21st.dev/@Astryxdesign/components/astryx-mobile-nav-toggle

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/Astryxdesign/astryx-mobile-nav-toggle?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/toggle.md
