Menu

A menu displays a list of actions or options that a user can choose.

Examples

Disabled keys

Sections

Props

autoFocus
boolean | FocusStrategy—
style
CSSProperties | ((values: MenuRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)—
slot
string | null—
id
string—
disabledKeys
Iterable<Key>—
items
Iterable<T>—
dependencies
readonly any[]—
onScroll
((e: UIEvent<HTMLDivElement, UIEvent>) => void)—
onAction
((key: Key) => void)—
escapeKeyBehavior
"none" | "clearSelection"'clearSelection'
shouldFocusWrap
boolean—
selectionMode
SelectionMode—
disallowEmptySelection
boolean—
selectedKeys
"all" | Iterable<Key>—
defaultSelectedKeys
"all" | Iterable<Key>—
onSelectionChange
((keys: Selection) => void)—
renderEmptyState
(() => ReactNode)—
onClose
(() => void)—
showCheckmarkOnSelected
boolean—