Components · Navigation
Menubar
StableAdded v0.0.1
A horizontal bar of menus, like a desktop app’s File / Edit / View, built on Radix.
import { Menubar } from '@nexub/react';Usage
Use it for
Editors and tools with many commands grouped like a desktop app
Use something else for
Site navigation: use `NavigationMenu` or `TopNav`
A few icon actions: use `Toolbar`
Examples
Default
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| Menubar.Root | compound | — | The bar (value, onValueChange, loop). |
| Menubar.Menu | compound | — | One menu: a trigger and its content. |
| Menubar.Trigger | compound | — | The menu’s button in the bar. |
| Menubar.Portal / Content | compound | — | Renders the floating menu in a portal (sideOffset default 8). |
| Menubar.Item | compound | — | An action (onSelect, disabled). |
| Menubar.CheckboxItem / RadioGroup / RadioItem | compound | — | Toggle and single-choice items. |
| Menubar.Label / Group / Separator / Arrow | compound | — | Section heading, grouping, divider and an optional arrow. |
| Menubar.Sub / SubTrigger / SubContent | compound | — | A nested submenu. |
Accessibility
ARIA roles
menubarmenumenuitem
Keyboard
- Arrow Left / Right
Moves between menus in the bar, and between open menus.
- Enter / Space / Arrow Down
Opens the focused menu.
- Escape
Closes the menu.
On iOS & Android
Web only
Menubar has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.