Components/Form
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/addressinput
Address input allows users to enter a location address. This component provides UI definition only and requires an address provider to be specified from the product side.
<AtlasAddressInput/> instead.Adjust the component size using size prop. It supports 3 sizes:
large - use it in onboarding flows, where input needs emphasis.medium (default) - use in all common cases.small - use in dense and narrow layouts.Style the component using border prop. It supports 4 styles:
round (default) - use it when input acts as a data filter.standard - use it in forms.bottomLine - use as a title which can be edited on the click.none - use in Content Manager's spreadsheet cell.Control component status using status prop. It supports 3 states:
error - use it to highlight an invalid input value.warning - use it to highlight a value that can't be validated.loading - use it to indicate a delayed response from the server.Add text that explains the status or what action the user should take with the statusMessage prop.
Showing the status message inline, directly below the input is preferred in all default cases.
<FormField/> and add the statusMessage.statusMessage prop.View more inline status message examples in <FormField/>.
Disable all input interactions with disabled prop. Use it to highlight unavailable functions.
Control whether to show a clear button with the clearButton prop. It allows to clear the field quickly when a value is optional.
Control the message displayed in the dropdown layout when no results are found via noResultsText.
Control an options list layout with optionLayout prop. It support 2 layouts for main and secondary labels:
single-line (default) - use it to display labels side by side.double-line - use it to stack labels vertically.Specify icons on the left side with prefix prop or choose not to show it by setting prefix to null.
By default, <LocationIcon /> is displayed.
Use list item builders to build a custom options list layout.
| Name | Type | Default | Description |
|---|---|---|---|
autoSelect | boolean | — | Specifies whether input is auto selected on focus. |
border | "none" | "standard" | "round" | "bottomLine" | — | Control the border style of an input. |
clearButton | boolean | true | Displays a clear button (X) on a non-empty input. |
clearButtonAriaLabel | string | — | Aria label for the clear button. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
disabled | boolean | — | Specifies whether input is disabled. |
enterKeyHint | "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | — | Sets the label of the virtual keyboard's enter key on touch devices. |
initialValue | string | — | Sets the initial input value. |
inputmode | string | — | Sets the native inputmode attribute, which picks the virtual keyboard on touch devices. Supported values are none, text, decimal, numeric, tel, search, email and url. |
noResultsText | ReactNode | — | Sets the message to show in a dropdown when no results are found. |
onBlur | FocusEventHandler | — | Defines a standard input onBlur callback. |
onChange | ChangeEventHandler | — | Defines a callback function which is called every time input value is changed. |
onClear | () => void | — | Defines a handler for getting notified upon a clear event. When passed, it displays a clear button in the input. |
onFocus | (e?: FocusEvent<HTMLInputElement, Element> | undefined) => void | — | Defines a standard input onFocus callback. |
onManuallyInput | ManualInputFnSignature | — | Defines a callback function which is called when user performs a submit action. Submit-Action triggers are: "Enter", "Tab". |
onSelect | (option: DropdownLayoutValueOption) => void | — | Defines a callback function which is called whenever a user selects a different option in the list. |
options | DropdownLayoutOption[] | — | Specify an array of options to render. When the option is an {optionProps}, the <AddressInput.Option/> component is rendered on behalf of the user. |
placeholder | string | — | Sets a placeholder message to display. |
popoverProps | PopoverCommonProps | — | Allows to pass common popover props. |
ref | null | string | (instance: AddressInputRef | null) => void | RefObject<AddressInputRef> | — | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). |
size | "small" | "medium" | "large" | — | Controls the size of the input and its dropdown options. Default value: medium. |
status | "error" | "warning" | "loading" | — | Specify the status of a field. Mostly used for "loading" indication upon async request calls. |
statusMessage | ReactNode | — | Defines the message to display on status icon hover. If not given or empty, no tooltip is displayed. |
value | string | — | Sets a value to display (controlled mode). |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getInputValue | Returns value of the input |
enterText | Enters given text to input |
clickClear | Clicks on the clear button to clear input text |
isDisabled | Checks if input is disabled |
clickAtOption | Clicks an option at given index |
clickAtOptionWithValue | Clicks an option with a given value |
isLoading | Whether loader is shown |
clickInput | Clicks on input |
getAmountOfItems | Gets amount of dropdown items |
getItemMainLabelAt | Gets item main label text at given index |
getItemSecondaryLabelAt | Gets item secondary label text at given index |
pressEnter | Press enter on address input |
isFocused | Checks whether the address input is focused |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 30 October 2026