Typeahead Multi component setup

task brazil Updated Sep 10, 2026 7 min read typeahead-multi-uib-component-setup.md
Raw file servicenow.com

The Typeahead Multi component supplements input fields with a dropdown panel of options in which more than one option can be selected. As users type into the field, multiple values are suggested. As typing continues, the suggested values are filtered or recomputed.

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.

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 Multi component 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.

    [Omitted image "typeahead-multi-content-tree.png"] Alt text: Content tree showing label "User dropdown typeahead multi"

  2. Select the Typeahead Multi component, using one of these methods:

    • Click anywhere within the component.
    • Select the Typeahead Multi 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

Typeahead Multi component properties

Configure the filtering and display capabilities of your Typeahead Multi component with these properties.

To configure the properties, enter either static or dynamic input. Enter dynamic input by selecting the input type.

Label [property]

Description

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):
    • horizontal: Horizontally aligns the label with the field; the label displays to the left of the field.
    • 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.

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.

Disabled[disabled]

Disables user click interactions when true. The typeahead multi component is grayed out when disabled.

Search behavior[search]

Controls how to filter the items as the user types into the input.Values:

  • Managed: No filtering occurs
  • Initial: Items whose label or sublabel begins with the input value are displayed. Case-insensitive.
  • Contains: Items whose label or sublabel begins with the input value are displayed. Case-insensitive.

Default: Managed

Auto-focus[autofocus]

When true, the focus is automatically placed inside the input on page load.

Label [property]

Description

Placeholder text[placeholder]

Use this property to set a placeholder text for the input field. This text should suggest to the user what input is expected.

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 Field updated event to intercept the requested change and handle it manually.Default: false

Name[name]

Name of the field control. Dispatched with the field value on user interaction.

Max. characters[maxLength]

Maximum number of characters for the typeahead field.

Label [property]

Description

List items[items]

An array of DropdownListItem or DropdownListSection objects that the user can select from.Default: [{\"id\":\"usr1\",\"label\":\"User 1\",\"sublabel\":\"user1@servicenow.com\",\"avatarProps\":{\"userName\":\"User 1\",\"imageSrc\":\"http://i.pravatar.cc/24?u=33\",\"presence\":\"away\"}},{\"id\":\"usr2\",\"label\":\"User 2\",\"sublabel\":\"user2@servicenow.com\",\"avatarProps\":{\"userName\":\"User 2\",\"imageSrc\":\"http://i.pravatar.cc/24?u=34\",\"presence\":\"busy\"},\"disabled\":true},{\"id\":\"usr3\",\"label\":\"User 3\",\"sublabel\":\"user3@servicenow.com\",\"avatarProps\":{\"userName\":\"User 3\",\"imageSrc\":\"http://i.pravatar.cc/24?u=35\",\"presence\":\"offline\"}}]

Selected items[selectedItems]

An array of DropdownListItem objects representing each selected item. Populated automatically with the selected items in the Items field.Default: []

Manage selected items[manageSelectedItems]

If set to true, overrides automatic updates to the Selected items property. Use the Multiple items selected event to intercept the requested change and handle it manually.Default: false

Item size constraints[itemsListConstrain]

Optional sizing constraints to enforce on the items list popover. For each property, a positive integer can be specified that sets that constraint in pixels. You can also set the value to target for width, minWidth, or maxWidth keys. In this case, the items list is sized to match the width of the input field.Valid keys:

  • width
  • minWidth
  • maxWidth
  • height
  • minHeight
  • maxHeight

Label [property]

Description

Label[label]

Label describing the overall purpose of the select fieldDefault: Label

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]

If set, a popover button appears next to the field label for displaying additional hint text to the user. Such text can include password requirements or other instructions for completing the field. Use plain text for the text to be translatable.

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 multi invalid set event 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:

CSS
{    "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.

## Typeahead Multi component events

Select event handlers to configure the actions (events) provided with the Typeahead Multi component.

The Events tab shows the events used by the Typeahead Multi component. To view the available events, select + Add event mapping. Select the event in the list to add one or more event handlers.

Event handlers

Event handlers work with data resources to link the Typeahead Multi actions to the data you want to display to your users. Select the event in the list to add one or more event handlers.

For instructions on adding event handlers to an event, see Configure an event handler.

Event descriptions

Event

Description

Typeahead multi 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 multi list hidden

Dispatched when the typeahead menu has been closed and removed.

Typeahead multi invalid set

Dispatched when interaction with a field is complete and the validity of the field has changed. Contains the name and value of the field and a Boolean saying whether it's valid or not. To handle this action manually, set the manage-invalid property.

Multiple items selected

Dispatched when the user selects one or more items. Contains an array of IDs of the selected items. To handle this action manually, set the manage-selected-items property.

Field updated

Dispatched when the user changes the input field value. Contains the name and current value of the input field.

Typeahead multi 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
Search documentation
Search document titles and file paths on the brazil branch