Skip to main content
Version: Next

Menu API

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

Props​

PropTypeDescription
childrenReact.ReactNode
closeOnSelectboolean
density'default' | 'compact' | 'comfortable'
elevation'default' | 'none' | 'low' | 'high'
onChange(open: boolean) => void
onClose() => void
onOpen() => void
onSelect(idx: number) => void
onSelectDetail(detail: MenuSelectDetail) => void
openboolean
placement'top' | 'bottom' | 'left' | 'right'
radiusnumber | string
shape'default' | 'square' | 'soft'
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
tone'default' | 'brand' | 'neutral' | 'info' | 'danger' | 'success' | 'warning'
typeaheadboolean
variant'surface' | 'soft' | 'solid' | 'outline' | 'flat' | 'contrast' | 'default' | 'line' | 'glass'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

PropTypeDescription
captionReact.ReactNode
checkedboolean
childrenReact.ReactNode
iconReact.ReactNodeAn Editora icon name ("settings"), or your own element.
roleMenuItemRole
shortcutReact.ReactNode
tone'danger' | 'success' | 'warning'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

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).

PropTypeDescription
childrenReact.ReactNode

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-menu>​

Menu renders the ui-menu custom element from @editora/ui-core, which can also be used without React.

Attributes: close-on-scroll, close-on-select, density, disabled, elevation, open, placement, radius, shape, size, tone, typeahead, variant

Events: change, close, open, select