The Select component allows the user to click and select an item from a list of options.
View source code(value: T) => voidHandler that is called when a option is selected.
(T | OptionGroup<T>)[]The list of options.
OptionThe current value (controlled).
stringclassName for the element.
stringMaximum height of the dropdown content.
"content" | "parent"Whether the Select should fit its parent or content.
Default: contentbooleanEnable a search bar inside the dropdown. Field becomes a button trigger.
Default: falsebooleanWhether the Select is disabled.
booleanWhether the Select is invalid.
stringThe name of the Select, used when submitting an HTML form.
FocusEventHandler<HTMLInputElement>Handler that is called when the element loses focus.
FocusEventHandler<HTMLInputElement>Handler that is called when the element receives focus.
(value: string) => voidCalled when the dropdown search value changes. Consumer should filter options.
stringTemporary text that occupies the Select when it is empty.
"bottom-end" | "bottom-start" | "end-bottom" | "end-top" | "top-end" | "top-start"Placement the menu will render relative to the field
(rawValue: string) => ReactNodeRender when no options are available; receives the current search value.
(option: T, state?: { isSelected: boolean; isDisabled: boolean; }) => ReactNodeFunction to render option. Should return DropdownItem(s).
(optionGroup: OptionGroup<T>) => ReactNodeFunction to render option group.
stringThe placeholder for the search bar.