Combobox
Search a list and choose one value, or several with type="multiple", with clear loading and error messages.
- Use it for
- One choice, or several with type="multiple", from a long list people search, including results loaded from your server.
- Not for
- Short lists where scanning is faster than typing. Try Select or ToggleGroup.
Combobox preview
Loading example…
Installation
npm install @stackunseen/uiimport { Combobox } from '@stackunseen/ui/application';@stackunseen/ui/styles.css and @stackunseen/ui/application.cssUsage and props
Import this component from @stackunseen/ui/application. Load @stackunseen/ui/styles.css first, then @stackunseen/ui/application.css.
Keep the search query separate from the chosen ID. The input filters the supplied options; set filterOption to false when your server already filtered them. Keep the selected value and search query in your app. Use filterOption={false} for options already filtered by your server.
labelstring- Visible field label and option-list name.
optionsreadonly ComboboxOption[]- Stable value, label, optional description and disabled reason. At most 200 matches are shown with a refinement hint.
type'single' | 'multiple' (optional)- Multiple keeps several selected IDs, shown as removable chips below the field, independent of the current results.
valuestring | null, or readonly string[] with type="multiple"- Selected ID or IDs. A value outside the loaded options remains explicit.
onValueChange(value) => void- Accept a requested selection, toggle or clear in your application.
querystring- Current search text.
onQueryChange(query: string) => void- Update the search text and, if needed, load new results from your server.
status'ready' | 'loading' | 'error' (optional)- Actual option availability. Supply error for a useful failure message.
All props
Loading…
For your coding agent
Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.
- Contract
- label · options · type?: single | multiple · value · onValueChange · query · onQueryChange
- Keeps honest
- Keep the selected value and search query in your app. Use filterOption={false} for options already filtered by your server.
- MCP
read_component "Combobox"on the docs endpoint
Keyboard and customization
Keyboard
Arrow keys move through options. Enter selects, Escape closes, and Tab leaves the field. Focus stays in the input.
Customization
Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio