Component
An application-style horizontal menu bar. Each menu has a trigger that opens a dropdown with items, sub-menus, and separators.
Import all parts of the component and piece them together
The root Menubar container.
| Prop | Type | Default |
|---|---|---|
value | string | -- |
onValueChange | function | -- |
className | string | "" |
| Shortcut | Description |
|---|---|
ArrowRight | Moves focus to the next top-level menu trigger. If a menu is open, the next menu opens. |
ArrowLeft | Moves focus to the previous top-level menu trigger. If a menu is open, the previous menu opens. |
Home | Moves focus to the first top-level menu trigger. |
End | Moves focus to the last top-level menu trigger. |
Enter | Opens or closes the focused menu. |
Space | Opens or closes the focused menu. |
ArrowDown | Opens the focused menu and moves focus into its items. |
Escape | Closes the open menu and restores focus to its top-level trigger. |
| Reference | What Rad UI follows |
|---|---|
The root uses role="menubar" with horizontal orientation. Triggers are menuitems with aria-haspopup="menu" and aria-expanded, and only the active trigger is in the tab order. | |
Uses menu semantics inside each opened menu for item navigation, submenu entry, and activation. |