Magoo Component UI logo Magoo Component UI
← Catalog

Menubar

menubar organism experimental

A desktop application menu bar whose top-level items each open a dropdown of actions with optional shortcuts and dividers.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
TwoMenus

Props

NameTypeReq
menus array ✓
label string

Related components

How to use

behavior.js (default export init(root)) drives all interaction from the DOM: clicking a top-level button opens its panel and closes the others by toggling data-open on the .menubar__menu wrapper; ArrowLeft/ArrowRight move between buttons (opening as you go once any menu is open), ArrowDown focuses the first item in the open panel, and Escape or an outside click closes everything. Each button's aria-expanded is kept in sync with its menu's open state. No configuration data-attributes are required; the open state lives on data-open per menu.

Use cases

navigation WCAG AA SEO 15 dir: both ai-generated