Skip to content
SevenUI
Sign in
On this page

Menubar

A horizontal menu bar with multiple menus — such as File, Edit, and View — built on the Base UI Menu primitive.

Installation

Bash

Usage

API reference

Extends the Base UI Menubar component — not a .Root: it renders a plain <div role="menubar"> directly, coordinating a row of individual Menu instances.

PropTypeDefault
modalbooleantrue
disabledbooleanfalse
orientation"horizontal" | "vertical""horizontal"
loopFocusboolean — arrow keys wraptrue

An ordinary Menu.Root from @base-ui/react/menu — the same primitive Dropdown Menu builds on, so items share the same data attributes, closeOnClick defaults, and checkbox/radio behavior documented there.

The menubar coordinates sibling menus through context: once one menu is open, hovering a different trigger switches the open menu automatically — no openOnHover prop is needed (or read). Open state styles via data-popup-open, pressed state via data-pressed.

The Positioner only exposes sideOffset and alignOffset — parented to a menubar trigger it automatically defaults to side="bottom" align="start", so there is no side/align prop to pass.

Submenus are identical to dropdown-menu’s (SubmenuRoot-based). Item, CheckboxItem, RadioGroup/RadioItem, Label, Separator, and Shortcut mirror their dropdown-menu counterparts.

Usage guidance

A menubar is a persistent, always-visible row of menus — reach for it when modeling an application-style command bar (File/Edit/View…), not as a one-off dropdown. For a single triggered menu use dropdown-menu; for a right-click / long-press menu use context-menu.

Was this page helpful?