Components/Form/AddressInput/AddressInputItem
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/addressinputitem
Address Input Item is an internal component that displays address list item in a dropdown selection. It's mainly used as a part of the <AddressInput/> component.
<ListItemSelect/> instead.The component consists of two labels accompanied by a location icon:
 - `mainLabel` - use it to display a main keywords for search suggestions;
 - `secondaryLabel` - use it for secondary address data, such as country or region.
Control the state of a component with:
 - `highlighted` - use it to mark a suggested value
 - `selected` use it to mark an active selection
 - `disabled` - use it to mark an unavailable item
Control option layout with optionLayout prop. It supports 2 values:
 - `single-line` (default) - use in all common cases
 - `double-line` - use for addresses that display more data (include country, region, post code and more)
Support option value with additional information added to `prefix` and `suffix` props. Props accept text, icons and even badges.
`prefix` area by default is filled with a location icon to indicate that this is an address list item.
Use it as a list item to build custom address input suggestions.
| Name | Type | Default | Description |
|---|---|---|---|
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
disabled | boolean | — | Specifies whether option is disabled. |
highlighted | boolean | — | Specifies whether option is highlighted. |
mainLabel | string | — | Sets the main label of an option. This label is a primary part that is matched to a search term or keyword. |
onClick | MouseEventHandler | — | Defines a callback function which is called every time option is clicked. |
optionLayout | "single-line" | "double-line" | 'single-line' | Sets the layout of mainLabel and secondaryLabel. Labels can be either side by side or stacked vertically. |
prefix | ReactNode | — | Pass a component you want to show as the prefix of the input, e.g., text, icon. |
secondaryLabel | string | — | Sets the additional information of an address. Usually contains a region or a country. |
selected | boolean | — | Specifies whether the option is selected. |
size | "small" | "medium" | — | Controls the size of the labels. When rendered inside <AddressInput/>, it is set from the input size. Default value: medium. |
suffix | ReactNode | — | Pass a component you want to show as the suffix of the input, e.g., text, icon, button. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getPrefix | Get prefix |
getMainLabelText | Get main label Text |
getSecondaryLabelText | Get secondary label Text |
getSuffix | Get suffix |
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: 22 October 2026