structyl

Menubar

stable

A horizontal bar of dropdown menus, like a desktop app.

Basic usage

Examples

Full application menubar

Three menus with submenus, separators, shortcuts, and radio groups.

Application menubar

Menubar supports multiple menus, submenus, shortcuts, checkbox and radio items.

Features

  • Multiple menus.
  • Roving focus across the bar.

Installation

bash
pnpm dlx structyl add menubar

API Reference

Menubar.Root

A horizontal bar of menus.

PropTypeDefault
valuestring

Controlled open menu.

onValueChange(value: string) => void

Called when the open menu changes.

loopboolean

Whether arrow navigation wraps.

true

Menubar.Menu

A single menu within the bar.

PropTypeDefault
valuestring

Optional stable identifier.

Menubar.Trigger

The button that opens a menu.

PropTypeDefault
disabledboolean

Disable this menu.

Menubar.Content

The menu surface.

PropTypeDefault

Menubar.Item

A selectable item.

PropTypeDefault
insetboolean

Indent the item.

Menubar | structyl