Skip to content
Cojeev UI

Menubar

Actions

Groups application commands into a horizontal row of keyboard-navigable menus.

React · copy into your project · light and dark themes

Try it

Loading preview…

Take it with you

Copy the example, API and usage notes for your editor or AI assistant.

Add to your project

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/menubar.json

The 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:

Terminal
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/menubar.json https://luv-jeri.github.io/cojeev-ui/r/typography.json

Using 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

PropTypeRequired
chevronbooleanNo

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

PropTypeRequired
variant"default" | "danger"No
insetbooleanNo

MenubarSubTriggerProps

PropTypeRequired
insetbooleanNo

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

openresthoverfocusactive

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.