Menu
A menu displays a list of actions or options that a user can choose.
Preview
Code
Examples
Disabled keys
Preview
Code
Sections
Preview
Code
Props
Name | Type | Default |
---|---|---|
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 | — |