Menubar API
import { Menubar } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
closeOnSelect | boolean | |
density | 'default' | 'compact' | 'comfortable' | |
elevation | 'default' | 'none' | 'low' | 'high' | |
headless | boolean | |
loop | boolean | |
onChange | (detail: MenubarChangeDetail) => void | |
onClose | () => void | |
onOpen | (selected: number) => void | |
onSelect | (detail: { selected?: number; index?: number; value?: string; label?: string; checked?: boolean; item?: HTMLElement }) => void | |
open | boolean | |
orientation | 'horizontal' | 'vertical' | |
placement | 'top' | 'bottom' | 'left' | 'right' | |
radius | number | string | |
selected | number | |
shape | 'default' | 'square' | 'soft' | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
tone | 'default' | 'brand' | 'neutral' | 'info' | 'danger' | 'success' | 'warning' | |
typeahead | boolean | |
variant | 'default' | 'surface' | 'soft' | 'solid' | 'outline' | 'flat' | 'line' | 'glass' | 'contrast' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Menubar.Content props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-menubar>
Menubar renders the ui-menubar custom element from @editora/ui-core, which can also be used without React.
Attributes: close-on-scroll, close-on-select, density, elevation, headless, loop, open, orientation, placement, radius, selected, shape, size, tone, typeahead, variant
Events: change, close, open, select