---
title: "Burger Menu Icon"
description: "The menu button of a phone layout. Its three bars turn into a cross or a back arrow while the menu is open."
url: https://gelatinui.com/components/burger-menu-icon
markdown_url: https://gelatinui.com/components/burger-menu-icon.md
access: free
install: "npx shadcn@latest add @gelatin-ui/burger-menu-icon"
registry_item: https://gelatinui.com/r/burger-menu-icon.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Burger Menu Icon

> The menu button of a phone layout. Its three bars turn into a cross or a back arrow while the menu is open.

Page: https://gelatinui.com/components/burger-menu-icon

## When to use it

Best for: The button that opens and closes the main menu on a small screen.

- Pass it to a Base UI trigger with `render` (`<DrawerTrigger render={<BurgerMenuIcon />} />`): the trigger then owns the state.
- Use `open` and `onOpenChange` when other parts of the page can close the menu.
- Use `morph="arrow"` when the open state means "go back".

## When not to use it

- For a menu of actions on a wide screen, use a [Navigation Menu](https://gelatinui.com/components/navigation-menu.md).
- For an icon button with no open state, use a [Button](https://gelatinui.com/components/button.md).

## Notes for agents

- It is a Button: `variant` (default `ghost`), `rounded`, `render`, `disabled`, and `className` pass through.
- `size` takes the Button icon sizes: `icon-xs`, `icon-sm` (default, 28px), `icon`, `icon-lg`.
- The name stays the same in both states (default "Menu"); `aria-expanded` says the state.
- Inside a Base UI trigger, the trigger `data-slot` wins: style it with `group/burger-menu-icon`.

## Anatomy

```text
BurgerMenuIcon
```

## API reference

### BurgerMenuIcon

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `aria-label` | `string` |  | Defines a string value that labels the current element. The accessible name, the same in both states. Default "Menu". Translate it with the page. |
| `className` | `string` |  |  |
| `busy` | `boolean` |  | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. |
| `glass` | `"clear" \| "dark" \| "light"` |  |  |
| `rounded` | `"default" \| "full"` |  |  |
| `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | "ghost" |  |
| `size` | `"icon" \| "icon-lg" \| "icon-sm" \| "icon-xs"` | "icon-sm" | The Button icon sizes: 24, 28 (default), 32, or 36px. The bars are 16px (12px on `icon-xs`). |
| `morph` | `"arrow" \| "x"` | "x" | `x` (default): the bars turn into an X. `arrow`: an arrow to the inline start. Both close. |
| `open` | `boolean` |  | Open (controlled). With `onOpenChange`. |
| `defaultOpen` | `boolean` | false | Open on the first render (uncontrolled). Default false. |
| `onOpenChange` | `function` |  | Runs on each press with the next state. Not called when a Base UI trigger owns the state. |

Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| BurgerMenuIcon | `burger-menu-icon` |  |  |  |

## Usage

Use it alone, or as the trigger of a Drawer.

```tsx title="menu-button.tsx"
import { BurgerMenuIcon } from "@/components/icons/burger-menu-icon";

export function MenuButton() {
  return <BurgerMenuIcon aria-label="Menu" />;
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/burger-menu-icon
```

It adds 15 registry items: 12 files, 2639 lines, and the npm packages `@base-ui/react`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Button](https://gelatinui.com/components/button.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Drawer](https://gelatinui.com/components/drawer.md)
- [Button](https://gelatinui.com/components/button.md)
- [Navigation Menu](https://gelatinui.com/components/navigation-menu.md)
- [Theme Switch](https://gelatinui.com/components/theme-switch.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Enter | Opens or closes the menu. |
| Space | Opens or closes the menu. |

## Motion

| Part | Motion |
| --- | --- |
| Open and close | morphStep · 2 × 120ms · the bars slide together, then turn into an X or an arrow |
