Put one menu for each word in the bar. Each menu has a trigger and its content with items.
editor-menubar.tsx
Menubar
<div>| Prop | Type | Default | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||
From Base UIMenubarBase UI docs | |||||||||||||||||||||
| modal | boolean | true | Whether the menubar is modal. | ||||||||||||||||||
| disabled | boolean | false | Whether the whole menubar is disabled. | ||||||||||||||||||
| orientation | "horizontal""vertical" | "horizontal" | The orientation of the menubar. | ||||||||||||||||||
| |||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | ||||||||||||||||||
MenubarTrigger
<button>| Prop | Type | Default | Description | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||||||||||||||
From Base UIMenu.TriggerBase UI docs | |||||||||||||||||||||||||||||||||||||
| children | ReactNode | — | |||||||||||||||||||||||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | ||||||||||||||||||||||||||||||||||
| handle | MenuHandle<unknown> | — | A handle to associate the trigger with a menu. | ||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||||||||||||||||||||||||||||||||
MenubarPortal
<div>| Prop | Type | Default | Description |
|---|---|---|---|
From Base UIMenu.PortalBase UI docs | |||
| keep | boolean | false | Whether to keep the portal mounted in the DOM while the popup is hidden. |
| container | — | A parent element to render the portal element into. | |
| class | — | CSS class applied to the element, or a function that returns a class based on the component's state. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
MenubarContent
<div>| Prop | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arrow | boolean | false | Show an arrow that points at the trigger. The gap grows from 4px to 8px. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdrop | boolean | — | Put a clear layer under the popup (Base UI Menu.Backdrop), for example to dim it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| portal | — | Other Base UI props of the inner parts. A className here adds to the component classes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| positioner | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdrop | PopupPartProps<MenuBackdropProps> | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arrow | PopupPartProps<MenuArrowProps> | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UIMenu.PopupBase UI docs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| children | ReactNode | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id | string | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final | — | Determines the element to focus when the menu is closed. - false: Do not move focus. - true: Move focus based on the default behavior (trigger or previously focused element). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, or false/undefined to do nothing. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ← → | Moves between the triggers. With a menu open, opens the next menu. |
|---|---|
| EnterorSpaceor↓ | Opens the menu of the focused trigger. |
| HomeorEnd | Moves to the first or the last trigger. |
| Escape | Closes the menu. Focus returns to its trigger. |
Built with
Installs with Menubar





