Skip to main content

ComboBox

ComboBox — Prism component.

Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggle
Live demo
Open ↗

When to use

  • Use it when Pick from a long list with type-ahead, or allow multiple selections.
  • Reach for something else when A handful of options where a plain Select is simpler.

Accessibility

Always render a visible <label> (the label prop wires htmlFor/id for you). Errors set aria-invalid and are announced via aria-describedby. Required fields expose aria-required.

Import

const { ComboBox } = window.PrismDesignSystem_39d121;

Props

PropTypeRequiredDescription
labelstring
descriptionstring
items(string | ComboBoxItem)[]YesOptions as strings or { value, label } objects.
selectionMode"single" | "multiple""single" (default) fills the input; "multiple" shows removable chips.
defaultValuestring
defaultSelectedKeysstring[]Pre-selected values (multiple mode).
selectedKeysstring[]Controlled selected values (multiple mode).
onSelectionChange(values: string[]) =&gt; voidFired in multiple mode with the full selected value array.
placeholderstring
onSelect(value: string, item: ComboBoxItem | null) =&gt; void
allowsCustomValuebooleanAllow free text that isn't in the list.
isDisabledboolean
idstring
classNamestring