028
Combobox
FormNo value
Customize
Field
Disabled
Code
<Field label="Timezone">
<Combobox
options={TIMEZONES}
placeholder="Pick a timezone"
value={tz}
onValueChange={setTz}
/>
</Field>Install
npx shadcn@latest add https://components.haedong.dev/r/combobox.json
Props
Data-driven like Select; each option may carry keywords for the filter. Label it with aria-label / aria-labelledby or wrap it in Field.
| Prop | Type | Description |
|---|---|---|
| options | { value; label; keywords?; disabled? }[] | The choices. The filter matches value, label and keywords. |
| value / defaultValue | string | Selected value (controlled / uncontrolled). |
| onValueChange | (value: string) => void | Called on click or Enter; the popover then closes. |
| placeholder / searchPlaceholder / emptyText | string | Trigger placeholder, search prompt, and the empty line. Defaults "Select" / "Search" / "No results". |
| name | string | Renders a hidden input so the value submits with a form. |