Skip to main content
A horizontal or vertical bar containing multiple menu triggers. Menubars are commonly used for application-level navigation and actions, providing a consistent interface for accessing various menus.

Import

Basic Usage

Key Props

The container for menus. Renders a <div> element. Props:
  • orientation: 'horizontal' | 'vertical' - The orientation of the menubar (default: 'horizontal')
  • modal: boolean - Whether the menubar is modal (default: true)
  • disabled: boolean - Whether the whole menubar is disabled (default: false)
  • loopFocus: boolean - Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys (default: true)
State:
  • data-has-submenu-open: 'true' | 'false' - Indicates whether any submenu within the menubar is open

Features

  • Keyboard navigation with arrow keys to move between menu triggers
  • Automatic hover behavior when a menu is open
  • Support for horizontal and vertical orientations
  • Modal and non-modal modes
  • Accessible ARIA attributes (role="menubar")
  • Loop focus option for continuous navigation

Styling Example

Common Patterns

Vertical Menubar

Non-Modal Menubar

Application Menu Bar