# Shadcn Menubar

> Open-source shadcn menubar components for desktop navigation, editor menus, and app commands.

- Type: shadcn/ui component, free
- Page: https://web.dev.reui.io/components/menubar
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/menubar.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/menubar.md
- MCP: `get_component("menubar")`, then `get_examples("menubar")`
- Examples: 5

## When to use

- Desktop style command bars of File, Edit and Account lists, with key hints and side flyouts
- Formatting and insert lists for a document editor, such as Bold, Italic, Media and Link
- View toggles and a single choice setting kept in the top bar, such as bookmarks or the theme

## When not to use

- A single list of actions or account options opened from one button: use [Dropdown Menu](https://web.dev.reui.io/components/dropdown-menu.md) (`get_component("dropdown-menu")`)
- Commands opened by right clicking a file, row or canvas, with no visible trigger: use [Context Menu](https://web.dev.reui.io/components/context-menu.md) (`get_component("context-menu")`)
- A signed in product header holding the logo, search, alerts and the user avatar: use the [Navbar blocks](https://web.dev.reui.io/blocks/application/navbar.md)

## Agent notes

- Give each `MenubarItem` its command through onClick, which both twins fire; Base UI never fires the Radix onSelect event
- `MenubarShortcut` is a plain span that prints the chord only; register the keys in your own keydown listener
- `MenubarLabel` throws on the base twin unless it sits inside a `MenubarGroup` or `MenubarRadioGroup`

## Examples

- [Basic](https://web.dev.reui.io/components/menubar/c-menubar-1.md): Basic menubar.. Best for file and Edit lists of plain text rows with key hints, dividers and a disabled New Incognito Window.
- [Submenus](https://web.dev.reui.io/components/menubar/c-menubar-2.md): Menubar with dropdown submenus.. Best for a side flyout in each list, Share with 3 channels under File and Find with 3 search commands under Edit.
- [Checkbox & Radio](https://web.dev.reui.io/components/menubar/c-menubar-3.md): Menubar with checkbox & radio items.. Best for a View list of 2 browser toggles beside a Theme list whose Light, Dark or System pick is held in state.
- [Icons](https://web.dev.reui.io/components/menubar/c-menubar-4.md): Menubar with icons.. Best for a leading icon on every row, with Profile and a destructive Sign out grouped under Account.
- [Formatting & Media](https://web.dev.reui.io/components/menubar/c-menubar-5.md): Menubar for formatting and media.. Best for bold and Italic rows, Strikethrough and Code toggles and an Insert list with a Media flyout and Link.

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
