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) => void—Called with the menu label and the activated item value.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

MenubarEntry props

PropTypeDefaultDescription
label *string—Item label.
valuestring—Reported to onSelect. Optional for entries that only open a submenu.
disabledboolean—Disables the entry.
iconReactNode—Element rendered before the label.
shortcutstring—Keyboard shortcut hint rendered at the end.
itemsMenubarEntry[]—Nested entries — renders this item as a submenu (arbitrary depth).
separatortrue—Pass { 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.