Appearance
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
| Name | Type | Default | Description |
|---|---|---|---|
square | boolean | undefined | Square 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
}[] | undefined | Menus of the bar (each is a label + items). |
aria-label | string | undefined | Accessible name of the menu bar (aria-label). |
flat | boolean | undefined | Removes the shadow. Overridden by the elevation prop when it is set. |
elevation | 0 | 1 | 2 | 3 | 4 | 5 | undefined | Shadow level 0–5 (scale); 0 means no shadow. Overrides flat. |
Events
| Name | Signature | Description |
|---|---|---|
select | (value: string) => void | A menu item was selected; receives its value. |