Menubar
The row of menus along the top of an app. The bar is a tonal track, and the open menu is a raised segment that springs from trigger to trigger as you sweep across.
Install
npx shadcn@latest add @nelumbo/menubarApp menubar
Click a menu, then move across the bar (or press Left and Right): the segment follows and the next menu opens. Down opens a menu, Right enters a submenu, Escape closes.
Nothing chosen yet (profile: maya)
Usage
import { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarShortcut, MenubarSeparator } from "@/components/ui/menubar"<Menubar> <MenubarMenu> <MenubarTrigger>File</MenubarTrigger> <MenubarContent> <MenubarItem> <Icon name="note_add" /> New tab <MenubarShortcut>⌘T</MenubarShortcut> </MenubarItem> <MenubarSeparator /> <MenubarItem variant="destructive">Quit</MenubarItem> </MenubarContent> </MenubarMenu></Menubar>Props
Everything else is Radix Menubar (value, onValueChange, loop, dir, onSelect, checked…).
| Prop | Type | Default | Notes |
|---|---|---|---|
MenubarItem variant | "default" | "destructive" | "default" | |
inset | boolean | false | Item, Label, SubTrigger: align with items that have an icon or check |
MenubarContent align | "start" | "center" | "end" | "start" | |
MenubarShortcut | string | Drawn as keycaps: "⇧⌘Z" becomes three caps |