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) => voidHandler that is called when an option is selected.
(value: string, debouncedSearchValue: string) => ReactNodeThe content to display when no options are available.
stringclassName for the element
stringRestricts the search to a specific country.
stringMaximum 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
booleanInternal props, do not use.
Default: falsebooleanWhether the Combobox is disabled.
booleanWhether the input should be displayed.
booleanWhether the Combobox is invalid.
booleanWhether the Combobox is loading.
stringThe 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.
stringTemporary 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
stringBias results around a specific country.
(inputProps: HTMLProps<HTMLInputElement>) => ReactNodeFunction to render the input.
({ key }: { key: string | number; }) => ReactNodeFunction to render options in a loading state.
(option: T, state?: { isSelected: boolean; }) => ReactNodeFunction to render option.
((optionGroup: ComboboxOptionGroup<T>) => ReactNode) & ((optionGroup: ComboboxOptionGroup<T>) => ReactNode)Function to render option group.
(option: T) => ReactNodeFunction to render the selected options. Act like a leftAddon for the underneath input.
(args: { getInputProps: () => GetInputPropsReturnValue; }) => ReactNodeFunction to render the search bar inside the dropdown header. Provides Downshift's getInputProps so the header input supports keyboard navigation (arrow keys, enter, etc.).
booleanWhether the combobox should show a clear button.
Default: falsestringThe current value (controlled).
"noDropdown" | "withDropdown"The visual style of the Autocomplete.