Zephora UI

Navigation

Menubar

Horizontal menubar of dropdown menus following the WAI-ARIA menubar pattern, driven by a declarative items array.

Import

import { Menubar } from "@zephora/react";

Examples

Basic

`onSelect` receives the menu label and the activated item value.

Last: none

Disabled items

Individual entries can be disabled; they are skipped by keyboard navigation.

API

Menubar props

PropTypeDefaultDescription
items *MenubarMenuData[]Top-level menus: { label, items: MenubarEntry[] }.
onSelect(menuLabel: string, value: string) => voidCalled with the menu label and the activated item value.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

MenubarEntry props

PropTypeDefaultDescription
label *stringItem label.
valuestringReported to onSelect. Optional for entries that only open a submenu.
disabledbooleanDisables the entry.
iconReactNodeElement rendered before the label.
shortcutstringKeyboard shortcut hint rendered at the end.
itemsMenubarEntry[]Nested entries — renders this item as a submenu (arbitrary depth).
separatortruePass { separator: true } as an entry to render a divider instead.

Keyboard

KeyAction
ArrowRight / ArrowLeftMove between top-level triggers; with a menu open, switch to the adjacent menu.
ArrowDown / ArrowUpOn a trigger: open its menu. Inside a menu: move between items.
Home / EndFocus the first / last top-level trigger.
Enter / SpaceActivates the focused item.
EscapeCloses the open menu and returns focus to its trigger.