ComboBox


Examples

foo
bar

margin
Learn More
children
node
The ComboBox wrapper's children. Only ComboBoxMenu and ComboBoxTextField are allowed
style
object
Optional styles object for the wrapper
rootRef
function
Maps to Downshift's refKey set in getRootProps. refKey must be set to "rootRef"

maxHeight
Learn More
emptyMessage
string
default: 'No Results'
String displayed when item length is 0
items
array
default: []
List of items inside the menu. See ActionList action prop types
isOpen
bool
Controls the menu's visibility
menuRef
function
Maps to Downshift's refKey set in getMenuProps. refKey must be set to "menuRef"

margin
Learn More
autoFocus
bool
Automatically focuses on the input when mounted
disabled
bool
Whether the input is disabled or not. Disables tag removal
delimiter
string
Adds a delimiter in between each tag
error
string
Renders an error message below the input
errorInLabel
bool
Optionally renders the error message to the right of the input's label
helpText
node
Additional text to help the user that renders below the input
id
string
The ID for the form input
itemToString
function
default: (item) => identity
Function that transforms selected items to render tag content
label
string
Label for the textfield
labelHidden
bool
Hides the label visually, but still accessible to screen readers
name
string
The name of the form input
onChange
function
default: (e) => void
Callback when the input value state changes
onFocus
function
default: (e) => void
Callback when the input is focused
onBlur
function
default: (e) => void
Callback when the input loses focus
placeholder
string
Placeholder text of the input
readOnly
bool
Whether the input is read only. Does not disable tag removal
removeItem
function
default: (item) => noop
Callback when a selected item is removed
required
bool
Whether the input is required or not
selectedItems
array
default: []
Array of selected items that render as Tags
value
string
Value of the input (NOTE: this is missing from prototypes)