Components/Inputs/Combobox

Combobox

Inputs

Filterable dropdown combining a text input with a popover list.

Single-value picker that opens a text search field to filter options in real time. Options support extra keywords for non-obvious matches (e.g. searching "edgar" matches a "SEC filings" option).

Usage

import { Combobox } from "nosible-ux"

const options = [
  { value: "us", label: "United States" },
  { value: "gb", label: "United Kingdom" },
  { value: "de", label: "Germany" },
]

export default function Example() {
  return <Combobox options={options} value={null} placeholder="Select country" />
}

Examples

With keyword synonyms

Accessibility

Backed by cmdk. Keyboard navigation, type-ahead filtering, and empty state are handled. The trigger announces the selected value or placeholder.

Props

Name TypeDefaultDescription
className
string | undefinedAdditional className applied to the trigger button.
onChange
((next: string | null) => void) | undefinedCalled when the selection changes.
onSearchChange
((next: string) => void) | undefinedCalled when the search query changes.
open
boolean | undefinedDemo-only: force the panel open and render it inline (no portal).
options
ComboboxOption[]The list of options to display.
placeholder
string | undefinedPlaceholder shown in the trigger when nothing is selected. Default: `"Select…"`.
search
string | undefinedControlled search query. When provided, takes over the internal input state.
searchPlaceholder
string | undefinedPlaceholder inside the search input. Default: `"SEARCH"`.
size
"sm" | "md" | "lg" | undefinedTrigger height tier. Default: `"md"`.
value
string | nullCurrently selected value. Pass `null` to clear.