Menu

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

Examples

Disabled keys

Sections

Props

id
string
style
CSSProperties | ((values: MenuRenderProps & { defaultStyle: CSSProperties; }) => CSSProperties)
onScroll
((e: UIEvent<HTMLDivElement, UIEvent>) => void)
autoFocus
boolean | FocusStrategy
slot
string | null
disabledKeys
Iterable<Key>
items
Iterable<T>
dependencies
readonly any[]
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