The initial selected keys in the collection (uncontrolled).
Optionaldependencies
dependencies?:readonlyany[]
Values that should invalidate the item cache when using dynamic collections.
Optionaldir
dir?:string
OptionaldisabledKeys
disabledKeys?:Iterable<Key,any,any>
The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with.
OptionaldisallowEmptySelection
disallowEmptySelection?:boolean
Whether the collection allows empty selection.
OptionalescapeKeyBehavior
escapeKeyBehavior?:"none"|"clearSelection"
Whether pressing the escape key should clear selection in the menu or not.
Most experiences should not modify this option as it eliminates a keyboard user's ability to
easily clear selection. Only use if the escape key is being handled externally or should not
trigger selection clearing contextually.
Overrides the default DOM element with a custom render function.
This allows rendering existing components with built-in styles and behaviors
such as router links, animation libraries, and pre-styled components.
Requirements:
You must render the expected element type (e.g. if <button> is expected, you cannot render an <a>).
Only a single root DOM element can be rendered (no fragments).
You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.
OptionalrenderEmptyState
renderEmptyState?:()=>ReactNode
Provides content to display when there are no items in the list.
OptionalselectedKeys
selectedKeys?:"all"|Iterable<Key,any,any>
The currently selected keys in the collection (controlled).
OptionalselectionMode
selectionMode?:SelectionMode
The type of selection that is allowed in the collection.
OptionalshouldCloseOnSelect
shouldCloseOnSelect?:boolean
Whether the menu should close when the menu item is selected.
OptionalshouldFocusWrap
shouldFocusWrap?:boolean
Whether keyboard navigation is circular.
Optionalslot
slot?:string|null
A slot name for the component. Slots allow the component to receive props from a parent component.
An explicit null value indicates that the local props completely override all props received from a parent.
Identifies the element (or elements) that describes the object.