Menubar
Organizes application commands into persistent top-level menus.
Installation
Install Menubar from Oros with shadcn CLI 4.13.0.
pnpm dlx shadcn@4.13.0 add @oros/menubarUsage
import {
Menubar,
MenubarPortal,
MenubarMenu,
MenubarTrigger,
MenubarContent,
MenubarGroup,
} from "@/components/ui/menubar"Open the Source tab in the preview for a complete working example.
Anatomy
| Export | Responsibility |
|---|---|
| Menubar | The root component that owns the primary structure and state. |
| MenubarPortal | Moves overlay content to a stable document layer. |
| MenubarMenu | A composable part of the component anatomy. |
| MenubarTrigger | Controls opening, selection, or disclosure behavior. |
| MenubarContent | Contains the primary visible content. |
| MenubarGroup | Groups related items into one logical set. |
| MenubarSeparator | Visually and semantically separates related groups. |
| MenubarLabel | Provides a visible label for its related control or value. |
| MenubarItem | Represents one option or repeated child. |
| MenubarShortcut | A composable part of the component anatomy. |
| MenubarCheckboxItem | Represents one option or repeated child. |
| MenubarRadioGroup | Groups related items into one logical set. |
| MenubarRadioItem | Represents one option or repeated child. |
| MenubarSub | A composable part of the component anatomy. |
| MenubarSubTrigger | Controls opening, selection, or disclosure behavior. |
| MenubarSubContent | Contains the primary visible content. |
API Reference
Menubar exports 16 named entries. Component exports accept the props of their underlying HTML element or Base UI component, plus an optional className, unless the source defines a more focused type.
MenubarComponentMenubarPortalComponentMenubarMenuComponentMenubarTriggerComponentMenubarContentComponentMenubarGroupComponentMenubarSeparatorComponentMenubarLabelComponentMenubarItemComponentMenubarShortcutComponentMenubarCheckboxItemComponentMenubarRadioGroupComponentMenubarRadioItemComponentMenubarSubComponentMenubarSubTriggerComponentMenubarSubContentComponent
Accessibility
- Menubar inherits focus management and keyboard support from Base UI; keep the provided trigger and content parts together.
- Give icon-only triggers an accessible name, retain visible focus styles, and verify Escape and focus-return behavior in the final composition.
Source
Menubar uses the standard shadcn API and is distributed through Oros. Installing it adds the component source and required dependencies to your app. The Source tab above shows a complete usage example.