BDMG UI

Select Input

Custom dropdown (no native select). Optional search with debounced filtering. Use value and onChange for controlled usage.

Installation

tsx
import { SelectInput } from "@workspace/ui/components/select-input"

Basic usage

tsx
const options = [
  { value: "a", label: "Option A" },
  { value: "b", label: "Option B" },
  { value: "c", label: "Option C" },
]

<SelectInput
  label="Choose one"
  placeholder="Select..."
  options={options}
  value={value}
  onChange={setValue}
/>

Searchable

Set searchable to true to filter options by typing. Search is debounced (300ms).

tsx
<SelectInput
  label="Searchable"
  placeholder="Type to search..."
  options={manyOptions}
  value={searchValue}
  onChange={setSearchValue}
  searchable
  searchPlaceholder="Search options..."
/>

Props

PropTypeDefaultDescription
labelstring-Label above the select.
errorstring-Error message shown below.
hintstring-Hint text below.
placeholderstring-Placeholder when no value selected.
options*SelectOption[]-Array of { value, label }.
valuestring-Controlled value.
onChange(value: string) => void-Called when selection changes.
searchablebooleanfalseShow search in dropdown (debounced 300ms).
searchPlaceholderstring-Placeholder for search input.
containerClassNamestring-Classes for the wrapper.
selectClassNamestring-Classes for the trigger.