v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Menubar

Grouped action menus with horizontal keyboard movement.

Interactive preview

Usage

import { Menubar } from "@devvy-ui/react";

<Menubar label="Editor actions" menus={[{id:'file',label:'File',items:[{id:'save',label:'Save',onSelect:save}]}]} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
menus{id,label,items: MenuAction[]}[]requiredMenu groups.
dirltr / rtlltrKeyboard direction.

Accessibility & behavior

Platform Behavior & Guidelines

Left/right, Home/End move between menu triggers; ArrowDown opens actions. Action lists reuse DropdownMenu. Set dir explicitly for RTL arrow behavior.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add menubar

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Menubar.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.