Skip to content

Menubar

SMenubar is a horizontal application menu bar (like "File / Edit / View"). It is built on Reka UI (the menubar role, arrow-key navigation between menus, portaled dropdown panels). Menus are set with the menus prop (a label + items); items work as in SDropdownMenu (item/separator/label, icons via SIcon). Choosing an item emits select.

Basic usage

Item icons

The icon field of a menu item draws a leading icon via SIcon (a registry name or a raw path).

API

Props

NameTypeDefaultDescription
squarebooleanundefinedSquare corners: removes the bar and menu border radius (rounded by default).
menus{ label: string; items: { type?: | "label" | "item" | "separator" | undefined; label?: string | undefined; value?: string; icon?: string; disabled?: boolean; danger?: boolean }[]; disabled?: boolean }[]undefinedMenus of the bar (each is a label + items).
aria-labelstringundefinedAccessible name of the menu bar (aria-label).
flatbooleanundefinedRemoves the shadow. Overridden by the elevation prop when it is set.
elevation0 | 1 | 2 | 3 | 4 | 5undefinedShadow level 0–5 (scale); 0 means no shadow. Overrides flat.

Events

NameSignatureDescription
select(value: string) => voidA menu item was selected; receives its value.