Skip to content
SkillCodex
Menu

Combobox

Combobox

A value control with an associated popup; it can be editable or select-only, and the popup can be a listbox, grid, tree, or dialog.

Try the component
Context, sources and actions
Sources and revision
Updated
Version
v1.0.26 · r2
Sources
5 sources
Status
Published
Read the sources

You may have searched for: type a city and choose from suggestionsa searchable list inside a form fieldshow matching options as I type

All phrasings

Decisive difference Combobox coordinates an associated popup and may accept free typing; Select is a native control whose value comes only from predefined options. Compared with Select

Save and share

Recognize

Choose from a list

Try it

Is the person choosing a native value, filtering by typing, or navigating a list?

Combobox

Shared trial context

A form asks the user to choose one value from a known option set before continuing.

Combobox

Mission

Combobox

Type Porto, move through suggestions with arrows, commit the correct city, then clear and recover from no results.

Typing narrows the available options.

Live result

Type a city to filter options.

Step 1 of 3

Try

Try the component. Your live result appears just above. Move on at your own pace.

Behavior and edge case
What to observe
Matching city options appear as the query changes and one active option is visually and programmatically identified.
Edge case
A query with no match keeps the typed value, announces that no options exist, and offers a clear recovery path.
What this example shows

Combobox is the value control that coordinates an associated popup and may be editable or select-only; Select is a native predefined-option form control, while Listbox is the composite option widget that can stand alone or serve as a popup.

Which fits your need?

Combobox

A value control needs an associated popup for options or richer assistance

Select

Choosing one or more known values from a predefined list

Which component will you use here?
Difference and sources

Combobox is the value control that coordinates an associated popup and may be editable or select-only; Select is a native predefined-option form control, while Listbox is the composite option widget that can stand alone or serve as a popup.

Read the sources
    Parts of the specimen

    Select a numbered marker on the schematic, or use the list below, to see its role. The schematic shows the concept's representative state.

    Label

    The persistent text that names a control or field.

    Level 1

    Understand

    In your own words

    What people describe

    Documented aliases: autocomplete, typeahead, searchable select

    • type a city and choose from suggestions
    • a searchable list inside a form field
    • show matching options as I type
    • an input with autocomplete results below
    • filter a long list before selecting
    • let me type or pick a suggested value

    Position in the atlas

    Relationship map

    Locate the chapter, neighboring concepts, and the next useful decision.

    • Chapter

      Choose from a list

      Combobox belongs to this comparison group.

    • Do not confuse

      Select

      Choose Combobox if the user must filter, type, or browse a popup richer than a closed list. Choose Select if the values are known and few and the native control is enough.

      Compare this pair
    • Do not confuse

      Listbox

      Choose Combobox if the user types or filters to reach a value and the options appear only on demand. Choose Listbox if the options stay visible on the page or if several may be selected at once.

      Compare this pair
    • Next step

      Compare the concepts in the chapter before choosing an implementation.

      Open the chapter

    Level 2

    Apply

    Choose

    Use it when

    • A value control needs an associated popup for options or richer assistance
    • An editable subtype benefits from filtering or suggestions

    Avoid it when

    • A short native Select is simpler
    • No associated popup or disclosed assistance is needed

    Compare

    Compare similar concepts

    Platform equivalents

    The same interaction can have a different name or contract on each platform. Check the mapping before choosing an API.

    • HTML

      Partial

      <input list> + <datalist>

      HTML Living Standard 2026-09

      The browser supplies native suggestions, but popup control, option rendering, and consistent accessibility are limited.

      Verified Official documentation
    • WAI-ARIA APG

      Direct

      role="combobox" + popup

      WAI-ARIA APG 2026-09

      The pattern defines editable and select-only variants, popup relationships, autocomplete modes, and keyboard behavior.

      Verified Official documentation
    • Radix UI

      No direct primitive

      No direct primitive

      Radix has no Combobox primitive; composing Popover and Command does not by itself provide the complete combobox contract.

      Verified
    • shadcn/ui

      Partial

      Combobox

      shadcn/ui docs 2026-09-03

      The recipe composes a popover and command list; editable value, focus, and selection behavior still require product testing.

      Verified Official documentation
    • Material UI

      Direct

      Autocomplete

      Material UI v9.4.0

      Autocomplete combines a text input with filtered options and supports constrained or free-solo values.

      Verified Official documentation
    • SwiftUI

      No direct primitive

      No direct primitive

      SwiftUI has no cross-platform combobox primitive; Picker and searchable are separate behaviors.

      Verified
    • Jetpack Compose

      Partial

      editable ExposedDropdownMenuBox

      Compose Material 3 docs 2026-08

      An editable exposed menu can implement autocomplete, but filtering, accepted values, and focus behavior remain authored.

      Verified Official documentation
    • Flutter

      Direct

      Autocomplete<T>

      Flutter API docs 2026-09

      Autocomplete connects text editing, option generation, keyboard highlighting, and selection.

      Verified Official documentation

    Understand → Recognize → Choose → Compare

    Pack for your agent

    Pre-written instructions to paste into your agent. Copying executes nothing.

    Implement correctly

    Build Combobox without breaking its behavior

    # Implement Combobox in your agent
    
    ## Objective
    Implement Combobox for this verified behavior: A value control with an associated popup; it can be editable or select-only, and the popup can be a listbox, grid, tree, or dialog.
    
    ## Prerequisites
    - Inspect the repository, design system, and existing tests first.
    - Preserve unrelated changes and keep the file scope bounded.
    - Confirm that Combobox matches the need before writing code.
    
    ## Required behavior
    - The value control owns or controls an associated popup, exposes its expanded state and follows the keyboard model of the popup role.
    - Escape closes the temporary surface and returns focus to a sensible control.
    
    ## States to cover
    - Combobox idle
    - Suggestions open
    - City committed
    
    ## Accessibility
    - ARIA role: combobox + popup (listbox | grid | tree | dialog)
    - The primary control or named region for Combobox has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    - In this editable listbox-popup specimen, DOM focus remains in the input while the active-option relationship communicates list navigation; other popup roles follow their own focus model.
    - Escape closes an open popup without committing a new value; whether text is preserved and which other actions close it are defined by the combobox subtype.
    - The combobox name, value, expanded state, popup relationship and relevant active or selected popup item are exposed; loading and result counts apply when the subtype provides them.
    - In this editable listbox-popup specimen, typing edits the query
    - Arrow Down and Up move the active option while focus remains in the input
    - Enter commits the active option
    - Escape closes suggestions without clearing text
    
    ## When not to use
    - A short native Select is simpler
    - No associated popup or disclosed assistance is needed
    
    ## Acceptance criteria
    - Editable or select-only behavior is explicit
    - The popup role and ownership relationship are explicit
    - Focus and keyboard behavior match the popup role
    - Escape closes the popup without committing a new value
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    
    • @base-ui/react
    • Requires · Access to the repository, design system, and tests
    Why it works
    • The need is tied to canonical behavior before any technical choice.
    • States, accessibility, and non-goals prevent a merely visual implementation.
    • Acceptance criteria and the output format make verification observable.

    Try next

    Verify Combobox on a real journey

    # Verify Combobox after implementation
    
    ## Objective
    Audit the Combobox implementation against its behavior, states, and accessibility requirements without changing it automatically.
    
    ## Checks
    - Replay the smallest representative journey.
    - Check keyboard behavior, focus, accessible name, and announcements.
    - Tie each gap to a specific acceptance criterion.
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    

    sha256:5edbd9e0208c72ed2f69f7cdd705ff848ed134ca312286d11c1f3e66b5417456

    Diagnose a problem

    Find and fix the Combobox defect

    # Debug Combobox in your agent
    
    ## Observed symptom
    [DESCRIBE THE SYMPTOM HERE]
    
    ## Observable checks
    - Reproduce the issue with the smallest relevant journey.
    - Compare behavior with the documented states and transitions for Combobox.
    - Verify keyboard behavior, focus, accessible name, and announcements.
    
    ## Possible causes
    - The chosen primitive does not match the expected behavior.
    - A state, transition, or focus return is missing.
    - A neighboring component captures an event or hides an accessible signal.
    
    ## Bounded corrections
    - Fix the reproduced cause without recreating neighboring components.
    - Preserve the public contract and add a focused regression test.
    - Do not install dependencies or change remote state without authorization.
    
    ## Final verification
    - Editable or select-only behavior is explicit
    - The popup role and ownership relationship are explicit
    - Focus and keyboard behavior match the popup role
    - Escape closes the popup without committing a new value
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    
    • @base-ui/react
    • Requires · Access to the repository, design system, and tests
    Why it works
    • The explicit symptom prevents starting from an assumed fix.
    • Checks separate behavior, accessibility, and neighboring interference.
    • The fix stays bounded and must produce regression evidence.

    Try next

    Lock in the Combobox fix

    # Prevent the Combobox regression
    
    ## Objective
    Turn the reproduced cause into a focused regression test and compare Combobox with neighboring concepts before widening the fix.
    
    ## Checks
    - Prove that the test fails before the fix.
    - Prove that it passes after the bounded fix.
    - Verify that no neighboring component changed behavior.
    
    ## Guardrails
    - Show the proposed changes before any external action.
    - Do not publish, send, delete, pay for, or change remote state without explicit authorization.
    - Preserve unrelated changes and stop if the scope becomes ambiguous.
    
    ## Output format
    - Outcome or verdict.
    - Files or actions involved.
    - Checks run and observable evidence.
    - Remaining blockers or limitations.
    

    sha256:5be5e52b00a81ef74f99f87b170488793d792ef23fef3030c790fb62605a5393

    Full entry, saving and provenance

    Pre-written instruction by SkillCodex — your request is neither sent nor used to adapt this text; no content is generated, and copying executes nothing.

    Pack digest: sha256:243f4a94089f4c75e2bff08ddafaae7855528715a4a4389509b7122504aa6d4e

    In code

    TechnologyPrimitiveVersionCaveat
    @base-ui/react

    Combobox

    @base-ui/react@1.6.0Base UI coordinates input, popup, active option, and selection; Dropdown Menu or an untested Popover composition is not equivalent.

    Level 3

    Verify

    Impact profile

    Measured implementation costs and operating constraints for this SkillCodex specimen. A missing evaluation is never treated as free.

    This profile contains a measured constraint to review before adoption.

    Rendering
    Client
    Lazy weight
    42.3 kB-gzip
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Sum of gzip -9 bytes for the lazy files of module 59057 in .next/server/app/(en)/term/[slug]/page/react-loadable-manifest.json after pnpm build:local at c9f1299.
    Low-end devices
    Degraded
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Loaded the 390 x 844 term route in isolated Chromium with 6x CPU throttling and reduced motion, then exercised the first state change; failures are recorded as non-blocking warnings.
    CPU / GPU
    Base UI and React filter and coordinate input, popup and option DOM state; no canvas or WebGL path is present.
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Static source inspection of the target lab module plus an interaction on the isolated Chromium verification route; checked DOM/React work and absence of canvas or WebGL.
    Reduced motion
    The global reduced-motion contract collapses animation and transition durations; the same states and controls remain available.
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Inspected src/app/globals.css prefers-reduced-motion rules and repeated the target interaction with reducedMotion=reduce in Chromium.
    Static fallback
    Without JavaScript, the term route stays on its localized Loading fallback; the profile and initial specimen are not revealed.
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Loaded all ten prerendered routes from a local next start build in Chromium with JavaScript disabled; each HTTP 200 remained on the localized Loading fallback, so the profile and specimen were not revealed.
    Server rendering
    Hydrates
    Measured ·
    Environment
    macOS 26.6.2; Node 24.19.0; pnpm 10.34.5; Next.js 16.3.0 Turbopack; Chromium 140
    Method
    Inspected the prerendered route response, then loaded the same route with JavaScript enabled and exercised the hydrated client specimen.
    Maintenance
    Stable

    Good fit

    • Long or dynamic option sets that benefit from typing and filtering.

    Avoid when

    • A tiny fixed set where a native Select is simpler and cheaper.

    Verification checklist

    Try these actions in the lab, then check the same behaviours in your agent’s result. Adapt the example names to your interface.

    1. 1. Do this

      In an editable combobox with list suggestions, type part of a known option and use the arrow keys, then Enter.

      Expected result

      Suggestions match the text; keyboard focus stays in the input while an active option is identified, and Enter commits that option.

    2. 2. Do this

      Reopen the suggestions, move to a different option, then press Escape.

      Expected result

      The popup closes without committing that option or silently clearing the text you typed.

    3. 3. Do this

      For a version with text input, enter a query that matches nothing, then correct it.

      Expected result

      The no-results state is explicit, your query remains editable, and matching suggestions return after correction.

    Full contract
    1. 1Editable or select-only behavior is explicit
    2. 2The popup role and ownership relationship are explicit
    3. 3Focus and keyboard behavior match the popup role
    4. 4Escape closes the popup without committing a new value

    Technical details

    Behaviors

    • Coordinate the popup

      The value control owns or controls an associated popup, exposes its expanded state and follows the keyboard model of the popup role.

    • Dismiss with Escape

      Escape closes the temporary surface and returns focus to a sensible control.

    States

    • Combobox idle

      Combobox idle

    • Suggestions open

      Suggestions open

    • City committed

      City committed

    State transitions
    • Combobox idle → Suggestions open

      Typing a supported query filters the city options and opens the suggestion list.

    • Suggestions open → City committed

      Enter, pointer, or touch commits the highlighted supported city.

    • Suggestions open → Combobox idle

      Escape dismisses uncommitted suggestions and preserves the prior value.

    • City committed → Combobox idle

      The clear control removes the committed city and returns focus to an empty input.

    Test scenarios

    Context
    A travel form lets the user search supported departure cities from a long international list.
    Mission
    Type Porto, move through suggestions with arrows, commit the correct city, then clear and recover from no results.
    Primary state
    Matching city options appear as the query changes and one active option is visually and programmatically identified.
    Edge case
    A query with no match keeps the typed value, announces that no options exist, and offers a clear recovery path.

    Visual signals

    • Value control that may be editable or select-only
    • Associated popup rendered as a listbox, grid, tree, or dialog
    • Expanded state and active or selected popup item exposed separately from the value

    Behavioral signals

    • The control opens and owns or controls its associated popup
    • Editable variants may filter or request suggestions as text changes
    • Select-only variants choose a value without arbitrary text entry

    Accessibility

    Role
    combobox + popup (listbox | grid | tree | dialog)
    Accessible name
    The primary control or named region for Combobox has a stable accessible name from visible text or an explicit programmatic label; placeholder text and tooltips are not names.
    Focus
    In this editable listbox-popup specimen, DOM focus remains in the input while the active-option relationship communicates list navigation; other popup roles follow their own focus model.
    Dismissal
    Escape closes an open popup without committing a new value; whether text is preserved and which other actions close it are defined by the combobox subtype.
    Scroll
    A long option collection scrolls without moving the page behind it, and the active or selected option stays visible.
    Announcement
    The combobox name, value, expanded state, popup relationship and relevant active or selected popup item are exposed; loading and result counts apply when the subtype provides them.
    Keyboard
    • In this editable listbox-popup specimen, typing edits the query
    • Arrow Down and Up move the active option while focus remains in the input
    • Enter commits the active option
    • Escape closes suggestions without clearing text

    Bindings

    Open the HTML, ARIA, Radix, and shadcn matrix
    • Combobox

      implementationKind
      shadcn-base
      nativeElement
      input
      ariaPattern
      combobox with listbox popup
      radixPrimitive
      Not applicable
      shadcnRecipe
      Combobox (Base UI backend)
      runtimeDependency
      @base-ui/react@1.6.0
      packageName
      @base-ui/react
      exportName
      Combobox
      exactVersion
      1.6.0
      status
      exception
      sourceId
      source-ui-base-combobox
      deprecationStatus
      active
      replacement
      Not applicable
      validFrom
      Not applicable
      validUntil
      Not applicable

      Equivalence caveat: Base UI coordinates input, popup, active option, and selection; Dropdown Menu or an untested Popover composition is not equivalent.

      Verify binding source

    Sources

    • WAI-ARIA APG: Combobox Pattern
      sourceId
      source-ui-aria-combobox
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-09T07:07:35Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:d603b09b28e04f4aa72706d55623e781db6001f875a70b97da62f457e92f87e3
      status
      verified

      Claim covered: Combobox: informative APG guidance for the combobox pattern: roles, states, relationships, and keyboard interaction.

    • Base UI: Combobox
      sourceId
      source-ui-base-combobox
      kind
      documentation
      canonicalUrl
      https://base-ui.com/react/components/combobox
      publisher
      Base UI
      sourceRevision
      http-etag:"5d7e66f2ad31904bc67401c7904cfdf2-ssl-df"
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:3dcc2a338c9c7f94097ac020263cd8547a8d8c4dcc4e8971a2ab8c8c6d1f1ae4
      status
      verified

      Claim covered: Combobox: documented parts, state APIs, interaction behavior, and implementation limits for Base UI Combobox.

    • WAI-ARIA APG: Listbox Pattern
      sourceId
      source-ui-aria-listbox
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/ARIA/apg/patterns/listbox/
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-09T07:07:36Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:7d0369bdd2fb3122cb1164a16ea1cb0b36960aaf5cc4e24e9c2bdedd888f050e
      status
      verified

      Claim covered: Combobox: informative APG guidance for the listbox pattern: roles, states, relationships, and keyboard interaction.

    • WHATWG HTML: The input element
      sourceId
      source-ui-html-input
      kind
      standard
      canonicalUrl
      https://html.spec.whatwg.org/multipage/input.html#the-input-element
      publisher
      WHATWG
      sourceRevision
      http-last-modified:2026-07-19T13:52:46Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:4699d26dbf428296b4b352b480b75c846a9a6b23cf3f124d6d6fe6b5e19d4eba
      status
      verified

      Claim covered: Combobox: normative native semantics, states, attributes, and browser behavior for input.

    • WCAG 2.2: Focus Appearance
      sourceId
      source-ui-wcag-understanding-focus-appearance
      kind
      documentation
      canonicalUrl
      https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance.html
      publisher
      W3C WAI
      sourceRevision
      http-last-modified:2026-07-02T10:07:49Z
      consultedAt
      2026-07-19
      license
      Not stated
      contentDigest
      sha256:fdcf316a1f0e3cc758eda9618322d132862124ff0a3f3b1a3acbf20daf804ff0
      status
      verified

      Claim covered: Combobox: informative WCAG guidance for evaluating visible keyboard focus appearance.