Menubar
A keyboard-coordinated bar of independent command panels.
Ordinary demos on this page explicitly use Shadcn Rhea, with matching examples. This does not change public compatibility defaults or imply complete browser, native-host or visual acceptance. Neutral Surface/Text atoms retain their own public semantics; the consumer composition supplies the family presentation theme.
A keyboard-coordinated bar of independent command panels.
Root.value identifies one open panel. Trigger.value and Content.value pair a panel. The bar uses one roving tab stop, left/right movement, ArrowDown/Up entry, vertical command navigation and typeahead. Escape restores the matching trigger; outside press and command selection dismiss. Controlled value emits requests without changing the owner.
Parts: Root, Trigger, Content, Item.
Draft source. Nested submenus, complete native/GPUI/compiler evidence, consumer/visual acceptance and independent lifecycle admission remain open.
Source-bound appearance / 固定来源呈现
Section titled “Source-bound appearance / 固定来源呈现”The demo explicitly selects styleProfile="rhea". Root and the existing Trigger/Content/Item consume the shared Shadcn style scope; new-york-v4 (alias new-york) remains separate. The draft projection also supports vega, nova, maia, lyra, mira, luma and sera; unknown profiles fail closed. Profile support is not stable admission or complete visual parity. Style changes retain the Base value, events and logical parts.
New York: 02cad611 menubar.tsx. Rhea: 3d98900 radix wrapper and style-rhea.css. These are distinct source identities, not a universal latest-style claim.
Existing Base expanded/focused/focus-visible/disabled facts drive paint. The shared Content/Item helpers also provide draft inset and variant="destructive" paint without introducing another behavior owner. This does not complete Menubar: Rhea hover still needs a neutral Base fact; group/checkbox/radio/submenu parts, exact alignment policy, translucent content and full placement/presence motion remain tracked in #907. Existing open-fact animation paint is not complete motion or native acceptance. Four-Web native input, AT, narrow/font-scaled geometry and independent exact-head evidence are still required. No DOM selector or page-only behavior substitutes for those missing capabilities.
Rhea retains the existing keyboard focus ring while closed, plus a forced-colors outline. Exact upstream focus/hover and outline-hidden projection still require closure; expanded paint alone is not a focus affordance.
Menubar is workspace source. There is no public proto-ui add target. Passing value selects controlled mode. Menubar reuses the shared menu-family Root props.
| Prop | Type | Default |
|---|---|---|
defaultValue | string | '' |
disabled | boolean | false |
loop | boolean | true |
a11yLabel | string | '' |
These props belong to Root. Trigger defaults disabled to false. Content defaults sideOffset to 4. Item defaults closeOnSelect to true.