Skip to content
nexubDesign System
v11.9.0

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';
View as Markdown

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

Props
PropTypeDefaultDescription
Menubar.Rootcompound—The bar (value, onValueChange, loop).
Menubar.Menucompound—One menu: a trigger and its content.
Menubar.Triggercompound—The menu’s button in the bar.
Menubar.Portal / Contentcompound—Renders the floating menu in a portal (sideOffset default 8).
Menubar.Itemcompound—An action (onSelect, disabled).
Menubar.CheckboxItem / RadioGroup / RadioItemcompound—Toggle and single-choice items.
Menubar.Label / Group / Separator / Arrowcompound—Section heading, grouping, divider and an optional arrow.
Menubar.Sub / SubTrigger / SubContentcompound—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