--- title: Typeahead component setup description: The Typeahead component provides users with a relevant dropdown of selectable options as they type in an input field.Define the controls to filter the search as the user types into the integrated search input fields and the search behavior of the Typeahead component with these properties.Select event handlers to configure the actions \(events\) provided with the Typeahead component. locale: en-US canonical_url: https://www.servicenow.com/docs/r/application-development/ui-builder/typeahead-component-uib-setup.html release: brazil product: UI Builder classification: ui-builder topic_type: task last_updated: "2026-09-10" reading_time_minutes: 6 breadcrumb: [UIB Setup Information, UI Builder, Builder library, Developing your application, Classic app development, Building applications] --- # Typeahead component setup The Typeahead component provides users with a relevant dropdown of selectable options as they type in an input field. ## Before you begin This task assumes you have placed the component on the page and are ready to configure the properties and events. For instructions on accessing and using features in UI Builder, see [Customize UI Builder pages using components](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/ui-builder/work-components.md). **Note:** This document describes the latest component functionality. Go to the store to make sure you have the latest version of the component. Role required: admin or ui\_builder\_admin ## Procedure 1. Define a label for your Typeahead that differentiates it from other components in the content tree. A label makes finding the component easier in a large list of components. For instructions on using the content tree, see [Manage UI pages and page variants](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/ui-builder/work-pages.md). \[Omitted image "typeahead-multi-content-tree.png"\] Alt text: Image showing Typeahead component content tree 2. Select the Typeahead component, using one of these methods: - Click anywhere within the component. - Select the Typeahead label you created for your component in the content tree. The property fields appear in the **Config** tab in the setup panel on the right. **Parent Topic:**[UIB Setup Information](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/ui-builder/uib-setup-information.md) ## Typeahead component properties Define the controls to filter the search as the user types into the integrated search input fields and the search behavior of the Typeahead component with these properties. To configure the properties, enter either static or dynamic input. Enter dynamic input by selecting the input type. - **Data binding**: Creates dynamic property values from multiple sources. Sources include state variables \(@state\), URL variables \(@context\), or data resource payloads \(@data\). For details, see [Add and configure data resources to a page](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/ui-builder/add-data-resources.md). - **Scripting**: Creates a scripted property value. For details on scripted values, see [Create and bind a client state parameter to a component](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/application-development/ui-builder/state-parameters.md).
| Label \[property\] | Description |
|---|---|
| Size\[size\] | Size of the component in either **small** or **medium**.Default: **medium** |
| Search behavior\[search\] | Control to filter the items in the integrated search input. |
| Disabled\[disabled\] | Disables user click interactions when **True**. The typeahead component is grayed out when disabled. |
| Read-only\[readonly\] | By enabling this property, the user cannot modify the value of the input field. The input field is not disabled in this setting. |
| Auto-focus\[autofocus\] | When **True**, the focus is automatically placed inside the input field when the page loads. |
| Field layout configuration\[fieldLayout\] | Determines whether the labels, field, and slotted content are arranged vertically or horizontally. This property also determines the respective proportions of each element in a horizontal container. The field layout has two configuration properties: - **layout** \(string\): - **"layout":"horizontal"**: Horizontally aligns the label with the field; the label displays to the left of the field. - **"layout":"vertical"** \(default\): Vertically aligns the label with the field; the label displays above the field. - **columns** \(array\): If the layout is horizontal, the component uses the **columns** array to set the grid template column width for the containers. |
| Label \[property\] | Description |
|---|---|
| Placeholder text\[placeholder\] | Hint about the expected input text. |
| Value\[value\] | Value for the input field.**Note:** This field remains empty unless it has pre-populated data. |
| Manage value\[manageValue\] | If set to **true**, overrides automatic updates to the **Value** property. Use the **Text entered** event to intercept the requested change and handle it manually.Default: **false** |
| Name\[name\] | Name of the field control. |
| Max. characters\[maxLength\] | Maximum number of characters for the typeahead field. |
| Label \[property\] | Description |
|---|---|
| List items\[items\] | Possible items for selection. |
| Selected item\[selectedItem\] | ID of the selected item. |
| Manage selected item\[manageSelectedItem\] | If set to **true**, overrides automatic updates to the **Selected item** property. Use the **Item selected** event to intercept the requested change and handle it manually.Default: **false** |
| Item size constraints\[itemListConstrain\] | Sizing constraints on the items list. |
| Label \[property\] | Description |
|---|---|
| Label\[label\] | Purpose of the selected field. |
| Wrap label\[wrapLabel\] | If the label doesn't fit on one line, wraps the label. |
| Required\[required\] | Use this property to indicate that the user must enter a value in the field before proceeding.Default: **false** |
| Hide required indicator\[hideRequiredIndicator\] | When true, the graphic that indicates the field is required is visually hidden. Set this property to **true** for forms where most fields are required. If this property is **true**, also set the **Optional** flag for any fields that are not requiredDefault: **false** |
| Optional\[optional\] | Visually indicates that the field is optional.Default: **false** |
| Helper text\[helperContent\] | Hint text to the users. |
| Label \[property\] | Description |
|---|---|
| Invalid\[invalid\] | When **true**, this flag indicates that the field is in an incorrect state. This information is visually reflected in the field display. This property is set automatically based on the current validity of the input field. |
| Manage invalid\[manageInvalid\] | If set to **true**, overrides automatic updates to the **Invalid** property. Use the **Typeahead invalid set** to intercept the requested change and handle it manually.Default: **false** |
| Alert messages\[messages\] | Array of alert messages that display below the field. The following list describes each object's properties:- `content`: The text of the alert message. - `status`: The type of alert to display. - `icon`: Icon to display at the start of the alert message. Default: ``` { "name": "content", "label": "Content", "fieldType": "string", "translatable": true }, { "name": "status", "label": "Status", "fieldType": "choice", "typeMetadata": { "choices": [ { "label": "Critical", "value": "critical" }, { "label": "Warning", "value": "warning" }, { "label": "Positive", "value": "positive" }, { "label": "Info", "value": "info" }, { "label": "Suggestion", "value": "suggestion" } ] } }, { "name": "icon", "label": "Icon", "fieldType": "icon" } ``` |
| Label \[property\] | Description |
|---|---|
| ARIA properties\[configAria\] | A JSON field for configuring ARIA properties, such as **aria-braillelabel**. |
| Landmark\[landmark\] | Enable the Landmark Focus keyboard shortcut to focus on this typeahead. |
| Event | Description |
|---|---|
| Typeahead list visible | Dispatched when the typeahead menu opens and renders the content. This event is dispatched only after the typeahead menu is rendered in the DOM API. The payload contains the components inner `now-dropdown-list` element. |
| Typeahead list hidden | Dispatched when the typeahead menu has been closed and removed. |
| Typeahead invalid set | Dispatched when interaction with a field is complete and the validity of the field has changed. |
| Item selected | Dispatched when the user selects an item from the dropdown. |
| Text entered | Dispatched when the user types or pastes text in the field. |
| Typeahead enter keydown | Dispatched when the Enter key is pressed while focus is inside the typeahead, without highlighting an item from the items list. The payload contains the following:- `name`: Name of the input field - `value`: Value of the input field |