isOpen | boolean | Sets the open state of the menu. |
defaultOpen | boolean | Sets the default open state of the menu. |
onOpenChange | (
(isOpen: boolean
)) => void | Method that is called when the open state of the menu changes. |
items | Iterable<T> | Item objects in the collection. |
disabledKeys | Iterable<Key> | The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. |
isDisabled | boolean | Whether the input is disabled. |
validationState | ValidationState | Whether the input should display its "valid" or "invalid" visual styling. |
isRequired | boolean | Whether user input is required on the input before form submission.
Often paired with the necessityIndicator prop to add a visual indicator to the input. |
description | ReactNode | A description for the field. Provides a hint such as specific requirements for what to choose. |
errorMessage | ReactNode | An error message for the field. |
label | ReactNode | The content to display as the label. |
placeholder | string | Temporary text that occupies the text input when it is empty. |
selectedKey | Key | null | The currently selected key in the collection (controlled). |
defaultSelectedKey | Key | The initial selected key in the collection (uncontrolled). |
onSelectionChange | (
(key: Key
)) => any | Handler that is called when the selection changes. |
autoFocus | boolean | Whether the element should receive focus on render. |
onFocus | (
(e: FocusEvent
)) => void | Handler that is called when the element receives focus. |
onBlur | (
(e: FocusEvent
)) => void | Handler that is called when the element loses focus. |
onFocusChange | (
(isFocused: boolean
)) => void | Handler that is called when the element's focus status changes. |
onKeyDown | (
(e: KeyboardEvent
)) => void | Handler that is called when a key is pressed. |
onKeyUp | (
(e: KeyboardEvent
)) => void | Handler that is called when a key is released. |
collection | Collection<Node<T>> | A pre-constructed collection to use instead of building one from items and children. |