Menubar
The application menu bar: File, Edit, View, each opening its own menu.
Its own component rather than a row of DropdownMenus, because a menu bar
behaves as one control. Once a menu is open, moving the pointer to a
neighbouring trigger switches to it without a click, and the arrow keys move
between menus as well as within them.
Live Examples
View Code
Open one menu, then move the pointer sideways. The next menu opens on its own.
Import
import {
Menubar,
MenubarMenu,
MenubarTrigger,
MenubarContent,
MenubarItem,
} from "@jarllyng/nostromo";Props
MenubarItem takes destructive and inset, the same as DropdownMenuItem.
Checkbox items, radio groups, labels, separators, shortcuts and submenus all have
the same shape as their dropdown counterparts, and share their styling, so the
three menus in this library cannot drift apart.
Related
DropdownMenu for a single menu from a button, ContextMenu for right-click.