Menubar
A horizontal bar of dropdown menus with checkbox, radio, submenu, and shortcut support. Built for app-style menu bars.
Installation#
pnpm dlx shadcn@latest add @davinciui/menubarUsage#
Each top-level trigger owns a MenubarMenu with its own content. Once a menu is open, hovering or arrow-keying across triggers switches menus without extra clicks.
Menubar
└── MenubarMenu
├── MenubarTrigger
└── MenubarContent
├── MenubarItem (+ MenubarShortcut)
├── MenubarCheckboxItem
├── MenubarRadioGroup + MenubarRadioItem
└── MenubarSub → MenubarSubTrigger + MenubarSubContentComposition#
Use the following composition to build a Menubar:
Menubar
└── MenubarMenu
├── MenubarTrigger
└── MenubarContent
├── MenubarLabel
├── MenubarItem
├── MenubarCheckboxItem
├── MenubarRadioGroup
│ └── MenubarRadioItem
├── MenubarSeparator
└── MenubarSub
├── MenubarSubTrigger
└── MenubarSubContentAPI Reference#
| Prop | Type | Default |
|---|---|---|
modalWhether the menubar takes over pointer interaction while open. | boolean | true |
disabledDisable the whole bar, a menu trigger, or an item. | boolean | false |
checkedControlled state (MenubarCheckboxItem). | boolean | — |
valueRadio group value or radio item value. | string | — |
onValueChangeRadio group change handler. | (value: string) => void | — |
insetIndent label-less items to align with checkable rows. | boolean | — |
variantItem tone (MenubarItem). | "default" | "destructive" | "default" |
alignContent alignment to its trigger. | "start" | "center" | "end" | "start" |
classNameAdditional classes on any part. | string | — |
Accessibility#
Built on Base UI menubar and menu primitives, which provide roving focus, arrow-key navigation, typeahead, and Escape handling; triggers and items show focus styling. The component adds no roles itself, and MenubarLabel is only a styled div.
Motion#
Menubar popups fade and scale from 95 percent over 150ms using starting and ending style transitions. The component does not detect prefers-reduced-motion, so that animation still runs for reduced-motion users; no timing or easing props are exposed.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

