Skip to Content

Menubar Menu

A navigation component that implements a persistent horizontal bar of top-level application menus. 
For more information on this component configuration, visit Radix UI 

Disabled

Use the disabled class to disable the component.

Disabled Item

Use the disabled attr or the disabled class to disable an item component.

Sizes

Use the menubar-{size} class to control the component size.

Size values can include:smmd.

For more information on all available sizing utilities, visit Tailwind 

Customizing

globals.css
:root { --ex-menubar-height-sm: calc(var(--spacing) * 10); --ex-menubar-height-md: calc(var(--spacing) * 12); --ex-menubar-px-sm: calc(var(--spacing) * 1.5); --ex-menubar-px-md: calc(var(--spacing) * 2); --ex-menubar-radius-sm: var(--radius-sm); --ex-menubar-radius-md: var(--radius-md); --ex-menubar-trigger-font-family: var(--font-sans); --ex-menubar-trigger-font-weight: var(--font-weight-normal); --ex-menubar-trigger-font-size-sm: var(--text-xs); --ex-menubar-trigger-font-size-md: var(--text-sm); --ex-menubar-trigger-height-sm: calc(var(--spacing) * 7); --ex-menubar-trigger-height-md: calc(var(--spacing) * 8); --ex-menubar-trigger-gap-sm: calc(var(--spacing) * 1); --ex-menubar-trigger-gap-md: calc(var(--spacing) * 1.25); --ex-menubar-trigger-px-sm: calc(var(--spacing) * 2); --ex-menubar-trigger-px-md: calc(var(--spacing) * 2.5); --ex-menubar-trigger-radius-sm: var(--radius-sm); --ex-menubar-trigger-radius-md: var(--radius-md); --ex-menubar-content-max-w-sm: var(--container-3xs); --ex-menubar-content-max-w-md: var(--container-2xs); --ex-menubar-content-radius-sm: var(--radius-sm); --ex-menubar-content-radius-md: var(--radius-sm); --ex-menubar-content-shadow-sm: var(--shadow-sm); --ex-menubar-content-shadow-md: var(--shadow-sm); --ex-menubar-section-gap-x-sm: calc(var(--spacing) * 1.5); --ex-menubar-section-gap-x-md: calc(var(--spacing) * 2); --ex-menubar-section-px-sm: calc(var(--spacing) * 1.5); --ex-menubar-section-px-md: calc(var(--spacing) * 2); --ex-menubar-section-py-sm: calc(var(--spacing) * 2); --ex-menubar-section-py-md: calc(var(--spacing) * 2.5); --ex-menubar-item-px-sm: calc(var(--spacing) * 2); --ex-menubar-item-px-md: calc(var(--spacing) * 2); --ex-menubar-item-py-sm: var(--spacing); --ex-menubar-item-py-md: var(--spacing); --ex-menubar-item-font-family: var(--font-sans); --ex-menubar-item-font-weight: var(--font-weight-normal); --ex-menubar-item-font-size-sm: var(--text-xs); --ex-menubar-item-font-size-md: var(--text-sm); --ex-menubar-indicator-font-size-sm: var(--text-sm); --ex-menubar-indicator-font-size-md: var(--text-base); --ex-menubar-label-font-family: var(--font-sans); --ex-menubar-label-font-weight: var(--font-weight-normal); --ex-menubar-label-opacity: var(--ex-options-opacity-muted); --ex-menubar-label-font-size-sm: var(--text-2xs); --ex-menubar-label-font-size-md: var(--text-xs); --ex-menubar-command-font-family: var(--font-sans); --ex-menubar-command-font-weight: var(--font-weight-normal); --ex-menubar-command-opacity: var(--ex-options-opacity-muted); --ex-menubar-command-font-size-sm: var(--text-2xs); --ex-menubar-command-font-size-md: var(--text-xs); --ex-menubar-arrow-height-sm: calc(var(--spacing) * 1.75); --ex-menubar-arrow-height-md: calc(var(--spacing) * 1.75); --ex-menubar-arrow-width-sm: calc(var(--spacing) * 3.5); --ex-menubar-arrow-width-md: calc(var(--spacing) * 3.5); }

API

For more information on this component configuration, visit Radix UI 

ElementSelector
Menubar.ex-menubar
PropTypeDefault
asElementTypediv
asChildbooleanfalse
defaultValuestring
loopbooleanfalse
valuestring
onValueChangefunction
PropTypeDefault
asChildbooleanfalse
valuestring
ElementSelector
Menubar.Trigger.ex-menubar-trigger
PropTypeDefault
asElementTypebutton
asChildbooleanfalse
PropTypeDefault
containerHTMLElementdocument.body
forceMountbooleanfalse
ElementSelector
Menubar.Content.ex-menubar-content
PropTypeDefault
asElementTypediv
asChildbooleanfalse
alignenum of ["start", "center", "end"]center
alignOffsetnumber-8
arrowPaddingnumber0
avoidCollisionsbooleantrue
forceMountbooleanfalse
hideWhenDetachedbooleanfalse
loopbooleanfalse
sideenum of ["top", "right", "bottom", "left"]bottom
sideOffsetnumber6
stickyenum of ["always", "partial"]partial
onCloseAutoFocusfunction
onFocusOutsidefunction
onInteractOutsidefunction
onPointerDownOutsidefunction
ElementSelector
ContextMenu.Section.ex-menubar-section
PropTypeDefault
asElementTypediv
asChildbooleanfalse
ElementSelector
Menubar.Arrow.ex-menubar-arrow
PropTypeDefault
asChildbooleanfalse
ElementSelector
Menubar.Item.ex-menubar-item
PropTypeDefault
asElementTypediv
asChildbooleanfalse
disabledbooleanfalse
textValuestring
onSelectfunction
ElementSelector
Menubar.ItemIndicator.ex-menubar-indicator
PropTypeDefault
asElementTypediv
asChildbooleanfalse
forceMountbooleantrue
ElementSelector
Menubar.Label.ex-menubar-label
PropTypeDefault
asElementTypediv
asChildbooleanfalse
ElementSelector
Menubar.Command.ex-menubar-command
PropTypeDefault
asElementTypekbd
asChildbooleanfalse
ElementSelector
Menubar.Separator.ex-menubar-separator
PropTypeDefault
asElementTypediv
asChildbooleanfalse
ElementSelector
Menubar.RadioGroup.ex-menubar-radio-group
PropTypeDefault
asElementTypediv
asChildbooleanfalse
valuestring
onValueChangefunction
ElementSelector
Menubar.RadioItem.ex-menubar-radio-item
PropTypeDefault
asElementTypediv
asChildbooleanfalse
disabledbooleanfalse
textValuestring
valuestring
onSelectfunction
ElementSelector
Menubar.CheckboxItem.ex-menubar-checkbox-item
PropTypeDefault
asElementTypediv
asChildbooleanfalse
checkedbooleanfalse
disabledbooleanfalse
textValuestring
onCheckedChangefunction
onSelectfunction
ElementSelector
Menubar.Sub.ex-menubar-sub
PropTypeDefault
asElementTypediv
asChildbooleanfalse
defaultOpenbooleanfalse
openbooleanfalse
onOpenChangefunction
ElementSelector
Menubar.SubTrigger.ex-menubar-sub-trigger
PropTypeDefault
asElementTypediv
asChildbooleanfalse
disabledbooleanfalse
textValuestring
ElementSelector
Menubar.SubContent.ex-menubar-sub-content
PropTypeDefault
asElementTypediv
asChildbooleanfalse
alignOffsetnumber-8
arrowPaddingnumber0
avoidCollisionsbooleantrue
forceMountbooleanfalse
hideWhenDetachedbooleanfalse
loopbooleanfalse
sideOffsetnumber8
stickyenum of ["always", "partial"]partial
onFocusOutsidefunction
onInteractOutsidefunction
onPointerDownOutsidefunction
Last updated on