Overview
Forms & inputs
Search for a command to run or a page to navigate to.
A searchable dropdown that combines an input with a list of selectable options.
import { Combobox } from "@strongtie/design-system/combobox"Not installed yet? Add the package to your app:
This module exports the following components:
ComboBoxComboBoxTriggerComboBoxTriggerInputComboBoxContentComboBoxInputComboBoxListComboBoxEmptyComboBoxItemGroupComboBoxItem<ComboBox>| Prop | Type | Default | Description |
|---|---|---|---|
disabled | boolean | - | |
onValueChange | ((arg: string) => void) | - | |
placeholder | string | - | |
value | string | - |
<ComboBoxTriggerInput>| Prop | Type | Default | Description |
|---|---|---|---|
onValueChange | ((search: string) => void) | - | Event handler called when the search value changes. |
value | string | - | Optional controlled state for the value of the search input. |
<ComboBoxInput>| Prop | Type | Default | Description |
|---|---|---|---|
onValueChange | ((search: string) => void) | - | Event handler called when the search value changes. |
value | string | - | Optional controlled state for the value of the search input. |
<ComboBoxList>| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | Accessible label for this List of suggestions. Not shown visibly. |
<ComboBoxItemGroup>| Prop | Type | Default | Description |
|---|---|---|---|
forceMount | boolean | - | Whether this group is forcibly rendered regardless of filtering. |
heading | ReactNode | - | Optional heading to render for this group. |
value | string | - | If no heading is provided, you must provide a value that is unique for this group. |
<ComboBoxItem>| Prop | Type | Default | Description |
|---|---|---|---|
disabled | boolean | - | Whether this item is currently disabled. |
forceMount | boolean | - | Whether this item is forcibly rendered regardless of filtering. |
keywords | string[] | - | Optional keywords to match against when filtering. |
onSelect | ((value: string) => void) | - | Event handler for when this item is selected, either via click or keyboard selection. |
value | string | - | A unique value for this item. If no value is provided, it will be inferred from children or the rendered textContent. If your textContent changes between renders, you must provide a stable, unique value. |