Menubar
ActionsGroups application commands into a horizontal row of keyboard-navigable menus.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/menubar.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/menubar.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing menubar
Items show stable, varied blob adornments by default. Set adornment={false} to hide, supply {shape,color,icon,effect}, or pass a custom icon element.
Create one MenubarMenu per command family and connect each item to its action.
Use checkbox or radio items for persistent command settings and submenus for another level.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
MenubarProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarMenuProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarPortalProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarGroupProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarRadioGroupProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarSubProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarTriggerProps
| Prop | Type | Required |
|---|---|---|
chevron | boolean | No |
MenubarContentProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarSubContentProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarItemProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | "danger" | No |
inset | boolean | No |
MenubarSubTriggerProps
| Prop | Type | Required |
|---|---|---|
inset | boolean | No |
MenubarCheckboxItemProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarRadioItemProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarLabelProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarSeparatorProps
Accepts the native or primitive props declared by its exported TypeScript type.
MenubarShortcutProps
Accepts the native or primitive props declared by its exported TypeScript type.
Accessibility
Keep the menubar trigger and item primitives intact for their menu keyboard behavior.
Give triggers concise category names and implement any shortcuts shown by MenubarShortcut.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.