StellarUI

<stellar-combobox>

Properties

Preview

Luna Whiskers Mittens Shadow

Markup

Copy
<stellar-combobox
  label="Favorite kitten"
  description="Pick one kitten."
  name="kitten"
  value="luna"
  placeholder="Search kittens"
>
  <stellar-combobox-item value="luna">Luna</stellar-combobox-item>
  <stellar-combobox-item value="whiskers">Whiskers</stellar-combobox-item>
  <stellar-combobox-item value="mittens">Mittens</stellar-combobox-item>
</stellar-combobox>

API

Complete props, events, slots, and implementation notes for the shipped combobox.

Props

PropTypeDefaultNotes
toneneutral | primary | secondary | tertiary | errorneutral
sizexs | sm | md | lg | xlmd
labelstring''
descriptionstring''
errorstring''
namestring''
valuestring''
placeholderstring''
openbooleanfalse
disabledbooleanfalse
readonlybooleanfalse
requiredbooleanfalse

Events

EventSourceNotes
inputhostFires when typing changes the filter query or when a user selection updates value.
changehostFires when a user commits an option selection.
focushostRedispatched when focus enters the combobox.
blurhostRedispatched when focus leaves the combobox.

Slots

SlotNotes
defaultAuthor one or more direct stellar-combobox-item children.
labelOptional label content. Overrides label when present.
descriptionOptional helper copy. Overrides description when present.
errorOptional error copy. Overrides error when present.

Notes

  • The public tag is `stellar-combobox`, with direct `stellar-combobox-item` children as options.
  • Typing filters visible options, but `value` only changes when the user commits a selection.
  • `open` can be driven from the host, but the component also opens on focus and closes after selection or blur.
  • `disabled` blocks both input and item interaction, while item-level `disabled` blocks individual options.
  • `required`, `aria-invalid`, and `custom-validity` forward to the inner native text input for validation-sensitive flows.
  • The host exposes `setCustomValidity()`, `checkValidity()`, `reportValidity()`, `validity`, `validationMessage`, and `willValidate`, so app code can use native-like validity APIs on the custom element.
  • For Datastar, prefer `data-attr:custom-validity="..."` on the custom element host instead of the Pro-only `data-custom-validity` attribute.