Create

Form

Combobox

Copy page View as Markdown Open in ChatGPT Open in Claude

A text field with a list of options that filters as you type, for one or several values.

Usage#

app.component.ts
import { WDS_COMBOBOX } from '@wds/angular/combobox';

Examples#

Default#

Type in the field to filter the options; ArrowDown highlights one and Enter selects it. The field then shows the selected option. Leaving it with other text restores the selection; leaving it empty clears the value. wds-change fires with value. Set empty-text: its default is in Polish.

Next.js SvelteKit Nuxt.js Remix Astro

Disabled#

Next.js SvelteKit Nuxt.js Remix Astro

Invalid#

invalid on wds-field (or on the combobox) shows the error state; wds-field-error describes it.

Framework Next.js SvelteKit Nuxt.js Remix Astro This field is required.

Clear button#

show-clear replaces the chevron with a button that clears the value while something is selected. Name it with clear-label.

Next.js SvelteKit Nuxt.js Remix Astro

Auto highlight#

auto-highlight highlights the first matching option as you type, so Enter selects it right away.

Next.js SvelteKit Nuxt.js Remix Astro

Groups#

wds-combobox-group with a wds-combobox-label groups the options. Groups without a match hide.

Americas (GMT-5) New York (GMT-8) Los Angeles (GMT-6) Chicago (GMT-5) Toronto (GMT-8) Vancouver (GMT-3) São Paulo Europe (GMT+0) London (GMT+1) Paris (GMT+1) Berlin (GMT+1) Rome (GMT+1) Madrid (GMT+1) Amsterdam Asia/Pacific (GMT+9) Tokyo (GMT+8) Shanghai (GMT+8) Singapore (GMT+4) Dubai (GMT+11) Sydney (GMT+9) Seoul

Groups and separators#

wds-combobox-separator draws a line between groups. Separators hide while you type.

Americas (GMT-5) New York (GMT-8) Los Angeles (GMT-6) Chicago (GMT-5) Toronto (GMT-8) Vancouver (GMT-3) São Paulo Europe (GMT+0) London (GMT+1) Paris (GMT+1) Berlin (GMT+1) Rome (GMT+1) Madrid (GMT+1) Amsterdam Asia/Pacific (GMT+9) Tokyo (GMT+8) Shanghai (GMT+8) Singapore (GMT+4) Dubai (GMT+11) Sydney (GMT+9) Seoul

Large list#

Filtering 500 options stays instant.

Item 1Item 2Item 3Item 4Item 5Item 6Item 7Item 8Item 9Item 10Item 11Item 12Item 13Item 14Item 15Item 16Item 17Item 18Item 19Item 20Item 21Item 22Item 23Item 24Item 25Item 26Item 27Item 28Item 29Item 30Item 31Item 32Item 33Item 34Item 35Item 36Item 37Item 38Item 39Item 40Item 41Item 42Item 43Item 44Item 45Item 46Item 47Item 48Item 49Item 50Item 51Item 52Item 53Item 54Item 55Item 56Item 57Item 58Item 59Item 60Item 61Item 62Item 63Item 64Item 65Item 66Item 67Item 68Item 69Item 70Item 71Item 72Item 73Item 74Item 75Item 76Item 77Item 78Item 79Item 80Item 81Item 82Item 83Item 84Item 85Item 86Item 87Item 88Item 89Item 90Item 91Item 92Item 93Item 94Item 95Item 96Item 97Item 98Item 99Item 100Item 101Item 102Item 103Item 104Item 105Item 106Item 107Item 108Item 109Item 110Item 111Item 112Item 113Item 114Item 115Item 116Item 117Item 118Item 119Item 120Item 121Item 122Item 123Item 124Item 125Item 126Item 127Item 128Item 129Item 130Item 131Item 132Item 133Item 134Item 135Item 136Item 137Item 138Item 139Item 140Item 141Item 142Item 143Item 144Item 145Item 146Item 147Item 148Item 149Item 150Item 151Item 152Item 153Item 154Item 155Item 156Item 157Item 158Item 159Item 160Item 161Item 162Item 163Item 164Item 165Item 166Item 167Item 168Item 169Item 170Item 171Item 172Item 173Item 174Item 175Item 176Item 177Item 178Item 179Item 180Item 181Item 182Item 183Item 184Item 185Item 186Item 187Item 188Item 189Item 190Item 191Item 192Item 193Item 194Item 195Item 196Item 197Item 198Item 199Item 200Item 201Item 202Item 203Item 204Item 205Item 206Item 207Item 208Item 209Item 210Item 211Item 212Item 213Item 214Item 215Item 216Item 217Item 218Item 219Item 220Item 221Item 222Item 223Item 224Item 225Item 226Item 227Item 228Item 229Item 230Item 231Item 232Item 233Item 234Item 235Item 236Item 237Item 238Item 239Item 240Item 241Item 242Item 243Item 244Item 245Item 246Item 247Item 248Item 249Item 250Item 251Item 252Item 253Item 254Item 255Item 256Item 257Item 258Item 259Item 260Item 261Item 262Item 263Item 264Item 265Item 266Item 267Item 268Item 269Item 270Item 271Item 272Item 273Item 274Item 275Item 276Item 277Item 278Item 279Item 280Item 281Item 282Item 283Item 284Item 285Item 286Item 287Item 288Item 289Item 290Item 291Item 292Item 293Item 294Item 295Item 296Item 297Item 298Item 299Item 300Item 301Item 302Item 303Item 304Item 305Item 306Item 307Item 308Item 309Item 310Item 311Item 312Item 313Item 314Item 315Item 316Item 317Item 318Item 319Item 320Item 321Item 322Item 323Item 324Item 325Item 326Item 327Item 328Item 329Item 330Item 331Item 332Item 333Item 334Item 335Item 336Item 337Item 338Item 339Item 340Item 341Item 342Item 343Item 344Item 345Item 346Item 347Item 348Item 349Item 350Item 351Item 352Item 353Item 354Item 355Item 356Item 357Item 358Item 359Item 360Item 361Item 362Item 363Item 364Item 365Item 366Item 367Item 368Item 369Item 370Item 371Item 372Item 373Item 374Item 375Item 376Item 377Item 378Item 379Item 380Item 381Item 382Item 383Item 384Item 385Item 386Item 387Item 388Item 389Item 390Item 391Item 392Item 393Item 394Item 395Item 396Item 397Item 398Item 399Item 400Item 401Item 402Item 403Item 404Item 405Item 406Item 407Item 408Item 409Item 410Item 411Item 412Item 413Item 414Item 415Item 416Item 417Item 418Item 419Item 420Item 421Item 422Item 423Item 424Item 425Item 426Item 427Item 428Item 429Item 430Item 431Item 432Item 433Item 434Item 435Item 436Item 437Item 438Item 439Item 440Item 441Item 442Item 443Item 444Item 445Item 446Item 447Item 448Item 449Item 450Item 451Item 452Item 453Item 454Item 455Item 456Item 457Item 458Item 459Item 460Item 461Item 462Item 463Item 464Item 465Item 466Item 467Item 468Item 469Item 470Item 471Item 472Item 473Item 474Item 475Item 476Item 477Item 478Item 479Item 480Item 481Item 482Item 483Item 484Item 485Item 486Item 487Item 488Item 489Item 490Item 491Item 492Item 493Item 494Item 495Item 496Item 497Item 498Item 499Item 500

Icon addon#

icon-start shows a registered icon at the start of the field; the start slot takes your own content instead.

Next.js SvelteKit Nuxt.js Remix Astro

trigger="button" turns the field into a button that opens a panel with a search field (search-placeholder). Use it for pickers whose value is more than text: the icon-start of the selected option, or an <img>, <svg>, wds-avatar or wds-icon placed directly in it, also shows in the button.

Afghanistan Albania Algeria American Samoa Andorra Angola

Form#

In a <form> the value is submitted under name; required blocks an empty submit.

FrameworkNext.jsSvelteKitNuxt.jsRemixAstroSubmit

Multiple#

multiple selects several options, shown as chips in the field; the list stays open after each pick. Backspace in the empty field removes the last chip; ArrowLeft moves to the chips. wds-change has all selected values; options with selected are selected by default. Name the remove buttons with remove-label.

Next.js SvelteKit Nuxt.js Remix Astro

Multiple disabled#

Next.js SvelteKit Nuxt.js Remix Astro

Multiple invalid#

Frameworks Next.js SvelteKit Nuxt.js Remix Astro Select at least one framework.

Locked chips#

locked on a selected option keeps it selected: its chip has no remove button.

Next.js SvelteKit Nuxt.js Remix Astro

Custom items#

Options can hold any content, such as an avatar with a name and a position. label sets the text shown in the field and used by the search.

Alex Morgan Software Engineer Emma Carter Product Manager Ryan Mitchell UX Designer Olivia Bennett Technical Lead Ethan Brooks CTO

Dialog#

The list opens in the top layer, so it shows above a wds-dialog.

Open DialogNext.jsSvelteKitNuxt.jsRemixAstroCancelConfirm

Custom trigger icon#

An <svg> in the icon slot replaces the chevron.

Next.js SvelteKit Nuxt.js Remix Astro

Member chips#

The avatar of an option also shows in its chip. ::part(chip) styles the chips, here as pills.

Alex Morgan Software Engineer Emma Carter Product Manager Ryan Mitchell UX Designer Olivia Bennett Technical Lead Ethan Brooks CTO

Invisible#

variant="ghost" removes the border and background of the field, for inline tags in a chat, a task or an assignment.

Alex Morgan Software Engineer Emma Carter Product Manager Ryan Mitchell UX Designer Olivia Bennett Technical Lead Ethan Brooks CTO

Status#

A status picker: the colored icon of the selected option shows in the button.

Backlog Planned In Progress Paused Completed Cancelled

Priority#

No Priority Urgent High Medium Low

Lead#

A “No lead” option above a separator, and “(you)” next to the current user.

No lead Alex Morgan (you) Emma Carter Ryan Mitchell Olivia Bennett Ethan Brooks

Multiple members#

With trigger="button" and multiple the button shows the selected options as badges. The value slot replaces them with your own summary, here avatars and a count. “No members” clears the selection.

3 membersNo members Alex Morgan (you) Emma Carter Ryan Mitchell Olivia Bennett Ethan Brooks

Date#

Dates relative to today, and “Custom date...” that opens a calendar in a wds-dialog.

Set startNo date Tomorrow21/10/2026End of week25/10/2026In one week27/10/2026End of month31/10/2026In one month20/11/2026Custom date... CancelSet date

Labels#

Several labels with a summary in the value slot; “No labels” clears the selection.

2 labelsNo labels Bug Feature Improvement Documentation Design

Team#

keywords lets the search find a team by what it does.

No team Testo Growth Atlas Platform Nova Studio Pulse Support Orbit Ops

Assignee#

“Invite...” is an action, not a value: the app restores the previous assignee and shows a toast.

No assignee Alex Morgan (you) Emma Carter Ryan Mitchell Olivia Bennett Ethan Brooks Invite...

Keywords#

keywords adds words that match without being shown: type “dollar” or “£”. The search ignores case and diacritics.

Polish złoty (PLN) Euro (EUR) US dollar (USD) British pound (GBP) Swiss franc (CHF)

Field#

In wds-field the label and the description become the accessible name and description of the combobox.

Country Poland Germany Czechia Slovakia We ship to these countries only.

With filter="none" the combobox does not filter by itself: it fires wds-search and the app replaces the options (here a simulated 400 ms request). The empty slot shows the loading state and the message when nothing matches.

AmsterdamAthensBarcelonaBerlinBrusselsBudapestCopenhagenDublin No city matches “”.

Forms#

Integration with Angular forms. Pick the API your app uses.

Signal forms#

WdsSelectField connects wds-combobox to [formField]; the value is a string (string[] with multiple).

AssigneeAnna SmithJohn CarterMaria GarciaWei ChenSubmit

Submitted: —

Template-driven#

WdsSelectValueAccessor makes ngModel work on wds-combobox.

AssigneeAnna SmithJohn CarterMaria GarciaWei ChenSubmit

Submitted: —

Reactive forms#

The same WdsSelectValueAccessor works with formControl and formControlName.

AssigneeAnna SmithJohn CarterMaria GarciaWei ChenSubmit

Submitted: —

API References#

wds-combobox#

A text field with a filtered list of options (WAI-ARIA combobox with list autocomplete). Typing filters the options; aria-activedescendant points to the highlighted one. With trigger="button" the field is a button that opens a panel (role="dialog") with a search field, for pickers whose value is more than text (status, assignee, labels). multiple selects several options, shown as removable chips (or badges with trigger="button"). Works in a form like <select>: name, required, and a reset restores the options with selected.

Attributes

AttributeTypeDefaultDescription
valuestring''Selected value (in multiple mode the first of values).
multiplebooleanfalseMultiple selection: the list stays open and the selected options show as chips.
triggerWdsComboboxTrigger'input'input: a text field to type in. button: a button that opens a panel with a search field.
variantWdsComboboxVariant'default'ghost: no border and background (e.g. inline tags in a chat or a task).
placeholderstring''Text of the field when nothing is selected.
search-placeholder.searchPlaceholderstring''Placeholder of the search field in the panel (trigger="button"). Empty: built-in text (common.searchPlaceholder).
empty-text.emptyTextstring''Message shown when nothing matches. The empty slot takes precedence. Empty: built-in text (combobox.empty).
filterWdsComboboxFilter'auto'auto filters the options by their text. none leaves filtering to the app (e.g. results from a server after wds-search).
auto-highlight.autoHighlightbooleanfalseHighlights the first matching option while typing, so Enter selects it.
show-clear.showClearbooleanfalseShows a button that clears the value (instead of the chevron when something is selected).
clear-label.clearLabelstring''Accessible name of the clear button. Empty: built-in text (common.clear).
remove-label.removeLabelstring''Accessible name of the chip remove button, followed by the option text. Empty: built-in text (common.remove).
max-label-count.maxLabelCountnumber2multiple with trigger="button": how many selected options to show as badges, the rest as "+N". 0 = all.
namestring''Field name in a form. Reflected to the attribute, which FormData uses.
disabledbooleanfalseDisables the field.
requiredbooleanfalseA value is required (valueMissing when empty).
invalidbooleanfalseError state (red border, aria-invalid).
openbooleanfalseWhether the list is open.
icon-start.iconStartstring | undefinedIcon at the start of the field (trigger="input"): the name of a registered icon, e.g. lucide-search (after import '@wds/core/icons/lucide/search'). The start slot takes your own content instead.

Properties

PropertyDescription
valuesstring[]Selected values (multiple mode).

Events

EventDescription
wds-open-changeCustomEvent<WdsComboboxOpenChangeDetail>The list opens or closes.
wds-changeCustomEvent<WdsComboboxChangeDetail>The user selects or removes an option.
wds-searchCustomEvent<WdsComboboxSearchDetail>The typed text changes.

Methods

MethodDescription
show()Opens the list.
close()Closes the list.
formResetCallback()
formDisabledCallback(disabled: boolean)
checkValidity()Returns true when the value is valid; otherwise fires invalid on the element.
reportValidity()Like checkValidity(), and shows the browser validation bubble when the value is invalid.
setCustomValidity(message: string)Sets a custom validation error (an empty string clears it), like input.setCustomValidity().

Slots

SlotDescription
(default)wds-combobox-item, wds-combobox-group, wds-combobox-separator.
startYour own content at the start of the field (trigger="input") instead of icon-start.
iconReplaces the chevron icon of the field.
valueCustom content of the field with trigger="button" (e.g. avatars of the selected people).
emptyContent shown when nothing matches (instead of empty-text), e.g. a spinner while loading.

CSS parts (::part)

PartDescription
fieldThe field: the input with chips and buttons, or the button with trigger="button".
inputThe text field (in the field, or in the panel with trigger="button").
valueThe selected value or the placeholder (trigger="button").
chipA selected option in multiple mode.
contentThe panel.
listThe list of options.
emptyThe "no results" message.

CSS custom properties

PropertyDescription
--wds-combobox-list-heightMaximum height of the list (default 18rem).

wds-combobox-item#

An option of wds-combobox (role="option"). The selected attribute marks the default selection. A direct child <svg>, <img>, wds-avatar or wds-icon is also shown next to the text in the field and in chips.

Attributes

AttributeTypeDefaultDescription
keywordsstring''Extra words matched by the search (e.g. synonyms, abbreviations).
lockedbooleanfalsemultiple mode: the selected option cannot be removed (its chip has no remove button).
valuestring''Option value.
labelstring | undefinedText shown in the field when selected. Defaults to the option content.
disabledbooleanfalseDisables the option.
icon-start.iconStartstring | undefinedIcon before the content: the name of a registered icon, e.g. lucide-globe (after import '@wds/core/icons/lucide/globe').
icon-end.iconEndstring | undefinedIcon after the content: the name of a registered icon.

Properties

PropertyDescription
selectedbooleanSelection state. wds-select sets it; the default selection is the selected attribute.

Slots

SlotDescription
(default)Option content (text, an icon, an avatar).

CSS parts (::part)

PartDescription
indicatorThe check mark.
icon-startThe icon before the content (icon-start).
icon-endThe icon after the content (icon-end).
baseThe row with the padding.

wds-combobox-group#

A group of wds-combobox options (role="group") named by its wds-combobox-label. It hides when none of its options match the search.

Slots

SlotDescription
(default)wds-combobox-label and wds-combobox-item.

wds-combobox-label#

The heading of a group of options. Use it inside wds-combobox-group.

Slots

SlotDescription
(default)Heading text.

CSS parts (::part)

PartDescription
baseThe text with the padding.

wds-combobox-separator#

A line between groups of options. Hidden while searching.

CSS parts (::part)

PartDescription
baseThe line.

Accessibility#

Screen reader#

The field is an <input> with role="combobox", aria-autocomplete="list" and aria-expanded (WAI-ARIA combobox with list autocomplete). Focus stays in it; aria-activedescendant points to the highlighted option. Give it a name: wds-field-label in wds-field, or aria-label on the element. The placeholder is not a name.

With trigger="button" the field is a <button> with aria-haspopup="dialog", named by the label and the selected value. The panel is a role="dialog" with a search field (role="combobox") that controls the list; focus moves to it on open and returns to the button on Escape or after a pick.

Options have role="option" with aria-selected; with multiple the list has aria-multiselectable. wds-combobox-group has role="group" named by its wds-combobox-label; separators, check marks and the icons copied into the field are hidden from screen readers.

Each chip has a remove button named “remove-label + option text”; a removed chip is announced in a role="status" region. The clear button is named by clear-label. Both are skipped by Tab: Backspace removes chips and an empty field clears the value.

The message shown when nothing matches (empty-text or the empty slot) is a role="status" region, so it is announced.

invalid and required set aria-invalid and aria-required. In a form the value is submitted under name (one entry per value with multiple), and a reset restores the options with selected.

Keyboard support#

KeyFunction
A–ZTypes in the field, opens the list and filters it.
ArrowDownArrowUpOpens the list, or moves to the next or previous option.
PageDownPageUpMoves 10 options down or up.
EnterSelects the highlighted option. With multiple the list stays open; otherwise it closes.
EscapeCloses the list and restores the text of the selected option.
TabCloses the list and moves focus to the next element on the page.
Backspacemultiple, empty field: removes the last chip that is not locked.
ArrowLeftArrowRightmultiple: from the start of the field moves between the chips; Backspace or Delete removes the focused chip.
EnterSpaceArrowDowntrigger="button", on the button: opens the panel with the search field.
Footer