# MenubarProps (@salmonui/buttons/menu)

> The MenubarProps interface of @salmonui/buttons/menu.

Canonical: https://salmonui.dev/docs/reference/buttons/menu/MenubarProps

```ts
import type { MenubarProps } from '@salmonui/buttons/menu';
```

Entry index: https://salmonui.dev/docs/reference/buttons/menu (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/buttons/menu.md).

## Reference

Kind: interface

```ts
interface MenubarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'defaultValue' | 'role' | 'onChange'> {
    readonly children?: ReactNode;
    readonly value?: string | null | undefined;
    readonly defaultValue?: string | null;
    readonly onValueChange?: (value: string | null, event: MenubarValueChangeEvent) => void;
    readonly onBeforeValueChange?: (event: MenubarBeforeValueChangeEvent) => void;
    readonly onAction?: (event: MenuActionEvent) => void;
    readonly submenuOpen?: MenuSubmenuOpen;
    readonly hoverDelay?: number;
    readonly overflow?: 'none' | 'scroll';
    readonly container?: Element | null;
    readonly localeText?: Partial<MenubarLocaleText>;
    readonly ref?: Ref<HTMLDivElement>;
}
```

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `children` | `readonly children?: ReactNode;` | optional | `MenubarMenu` and `MenubarItem` elements. |
| `value` | `readonly value?: string \| null \| undefined;` | optional | The open top-level menu (`MenubarMenu value`), or `null`. |
| `defaultValue` | `readonly defaultValue?: string \| null;` | optional |  |
| `onValueChange` | `readonly onValueChange?: (value: string \| null, event: MenubarValueChangeEvent) => void;` | optional |  |
| `onBeforeValueChange` | `readonly onBeforeValueChange?: (event: MenubarBeforeValueChangeEvent) => void;` | optional |  |
| `onAction` | `readonly onAction?: (event: MenuActionEvent) => void;` | optional | A chosen item of any menu or a `MenubarItem`; `event.preventDefault()` keeps the menu open. |
| `submenuOpen` | `readonly submenuOpen?: MenuSubmenuOpen;` | optional | `'hover'` (default): nested submenus open after `hoverDelay`, and while a menu is open the pointer moves it across the bar. `'click'`: both need a click. |
| `hoverDelay` | `readonly hoverDelay?: number;` | optional |  |
| `overflow` | `readonly overflow?: 'none' \| 'scroll';` | optional | `'scroll'`: the bar scrolls when its items do not fit, with indicators at the ends. Default `'none'`. |
| `container` | `readonly container?: Element \| null;` | optional | Portal target of the menus (default `document.body`). |
| `localeText` | `readonly localeText?: Partial<MenubarLocaleText>;` | optional |  |
| `ref` | `readonly ref?: Ref<HTMLDivElement>;` | optional | The `role="menubar"` element. |
