The autocompletePlace is an address input enhanced by Mapbox. This component is useful when the user need to enter an address.
View source code(value: MapboxPlace) => void
Handler that is called when an option is selected.
(value: string, debouncedSearchValue: string) => ReactNode
The content to display when no options are available.
string
className for the element
string
Restricts the search to a specific country.
string
Maximum height of the dropdown menu.
"content" | "parent"
Whether the Combobox should fit its parents or content.
Default: content"default" | "magicGradient"
The visual style of the Combobox
boolean
Internal props, do not use.
Default: falseboolean
Whether the Combobox is disabled.
boolean
Whether the input should be displayed.
boolean
Whether the Combobox is invalid.
boolean
Whether the Combobox is loading.
string
The name of the Combobox, 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.
string
Temporary text that occupies the Combobox 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
string
Bias results around a specific country.
(inputProps: HTMLProps<HTMLInputElement>) => ReactNode
Function to render the input.
({ key }: { key: string | number; }) => ReactNode
Function to render options in a loading state.
(option: T, state?: { isSelected: boolean; }) => ReactNode
Function to render option.
((optionGroup: ComboboxOptionGroup<T>) => ReactNode) & ((optionGroup: ComboboxOptionGroup<T>) => ReactNode)
Function to render option group.
(option: T) => ReactNode
Function to render the selected options. Act like a leftAddon for the underneath input.
(args: { getInputProps: () => GetInputPropsReturnValue; }) => ReactNode
Function to render the search bar inside the dropdown header. Provides Downshift's getInputProps so the header input supports keyboard navigation (arrow keys, enter, etc.).
boolean
Whether the combobox should show a clear button.
Default: falsestring
The current value (controlled).
"noDropdown" | "withDropdown"
The visual style of the Autocomplete.