Menubar Examples
10 desktop-style menu bars: File, Edit and View menus with shortcuts, submenus, sections, and checkbox and radio rows. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every menubar example
10 examples.
- Application MenubarStandardFile, Edit and View across the top. Common commands show shortcut hints, and separators split New from Save and Undo from Cut.

- Compact MenubarStandardOne Options menu with Settings and Preferences, then a separator and Sign Out. There is no File or Edit menu.

- Menubar with CheckboxesStandardA View menu of checkbox rows: Show Toolbar and Show Status Bar start checked, and Show Sidebar starts clear.

- Menubar with Destructive ActionStandardAn Edit menu with Cut, Copy and Paste, then a separator and Delete in the destructive color.

- Menubar with IconsStandardA File menu with an icon before each command: a file for New File, a folder for Open and a save icon for Save.

- Menubar with Radio GroupsStandardA View menu labeled Layout, with Grid, List and Columns. Grid starts checked, and only one of the three can be on.

- Menubar with SectionsStandardAn Edit menu split into Actions (Cut, Copy, Paste) and History (Undo, Redo), with a label on each section.

- Menubar with ShortcutsStandardAn Edit menu where Undo, Redo, Cut and Copy each show a shortcut hint: ⌘Z, ⇧⌘Z, ⌘X and ⌘C.

- Menubar with SubmenuStandardA File menu with New File, an Open Recent submenu of Document 1.txt, Document 2.txt and Document 3.txt, then Save.

- Simple Text MenubarStandardA menubar with one File menu of plain text rows: New File, Open and Save. No icons, shortcuts or separators.

Or describe it. With Pro, your AI agent installs the menubar example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Menubar examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
A row of menus across the top of an app, File, Edit, View, each opening a list of commands, the way desktop programs work. shadcn.io's Menubar lays out the triggers and handles each menu's focus, roles, keyboard navigation, submenus, and checkbox and radio rows.
Yes. Every example is free to use in personal and commercial projects. Seeing the code and installing it takes a free account.
A menubar holds an app's commands in several menus side by side. A Navigation Menu holds a website's links. A Dropdown Menu is one list of actions behind one button. Pick by what's inside: commands across menus, links, or a single list.
When it works like a desktop program, such as an editor, a design tool or an IDE, with many commands people return to. Content sites, simple dashboards and mobile-first apps rarely have enough commands to need one.
Wrap a `MenubarSubTrigger` and a `MenubarSubContent` in `MenubarSub`. The trigger draws its own chevron, and the submenu opens on hover or Arrow Right. Keep nesting to one or two levels.
Put a `MenubarShortcut` after the label in each `MenubarItem`. It only prints the hint, so register the keys on the page and keep both in one list so the hint and the binding can't drift apart.
Use `MenubarCheckboxItem` for toggles and `MenubarRadioGroup` with `MenubarRadioItem` for a single choice. With React Aria, the checkbox rows sit in a `MenubarGroup` with `selectionMode` set to `multiple`, and each row has an `id`. See the checkbox and radio group examples.
Signed in, copy the example's `npx shadcn@latest add` command. The CLI adds the Menubar and anything else the example uses, then the example as one file in your components folder.
Tapping a trigger opens its menu, but a row of small triggers is hard to use on a phone. Hide the bar on small screens, such as with `hidden md:flex`, and offer the same commands in a Dropdown Menu or a Sheet.
Listen for keydown on the page and run the same command the menu row runs. Keep the shortcuts in one list that both the listener and the `MenubarShortcut` text read from, and show Ctrl instead of ⌘ on Windows and Linux.
shadcn.io's Menubar for React, on Base UI, React Aria, Ark UI or Radix UI, and for Vue, Svelte and Solid, on Ark UI, styled with Tailwind CSS, with Lucide icons where an example has them.
Yes. The bar has the menubar role, each trigger announces its menu and whether it's open, and inside a menu the arrow keys move between rows, Enter runs one and Escape closes it. With Base UI, React Aria and Radix UI, Arrow Left and Arrow Right also move between the triggers; with Ark UI, Vue, Svelte and Solid, Tab does.
The menubar keeps open state, so it's a client component. Render it from a Server Component and pass the menus in as props, such as only the commands the user is allowed to run.
4.9 out of 5 from 150+ developers
Every menubar example. One prompt away.
Every menubar example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro

















