Skip to main content
Version: Next

Menubar API

import { Menubar } from '@editora/ui-react';

Props​

PropTypeDescription
childrenReact.ReactNode
closeOnSelectboolean
density'default' | 'compact' | 'comfortable'
elevation'default' | 'none' | 'low' | 'high'
headlessboolean
loopboolean
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
openboolean
orientation'horizontal' | 'vertical'
placement'top' | 'bottom' | 'left' | 'right'
radiusnumber | string
selectednumber
shape'default' | 'square' | 'soft'
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
tone'default' | 'brand' | 'neutral' | 'info' | 'danger' | 'success' | 'warning'
typeaheadboolean
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).

PropTypeDescription
childrenReact.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