# @salmonui/dropdowns/combobox API reference

> 24 exported symbols of @salmonui/dropdowns/combobox: 1 component, 12 interfaces, 10 types and 1 constant.

Canonical: https://salmonui.dev/docs/reference/dropdowns/combobox

```ts
import { … } from '@salmonui/dropdowns/combobox';
```

## Components

### Combobox

Kind: component

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/Combobox

```ts
function Combobox<Item = unknown>(props: ComboboxProps<Item>): ReactNode;
```

Combobox: the APG editable combobox. `label`, `description` and
`errorMessage` (shown while `invalid`) render around the input like on
`TextField` and are wired through `aria-labelledby` / `aria-describedby`.

## Interfaces

### ComboboxChipRenderProps

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxChipRenderProps

```ts
interface DropdownChipRenderProps<Item> {
    readonly item: Item;
    readonly label: string;
    readonly remove: () => void;
    readonly disabled: boolean;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `item` | `readonly item: Item;` |  |  |
| `label` | `readonly label: string;` |  |  |
| `remove` | `readonly remove: () => void;` |  |  |
| `disabled` | `readonly disabled: boolean;` |  |  |

### ComboboxColumn

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxColumn

```ts
interface ComboboxColumn<Item> {
    readonly field: string;
    readonly header?: string;
    readonly width?: number | `${number}%`;
    readonly align?: 'start' | 'end' | 'center';
    readonly format?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions | ((value: unknown, item: Item) => string);
    readonly renderCell?: (props: {
        readonly item: Item;
        readonly value: unknown;
        readonly text: string;
    }) => ReactNode;
    readonly renderHeader?: (props: {
        readonly column: ComboboxColumn<Item>;
    }) => ReactNode;
    readonly displayAsCheckbox?: boolean;
    readonly cellProps?: {
        readonly className?: string | undefined;
        readonly style?: CSSProperties | undefined;
        readonly [data: `data-${string}`]: string | number | boolean | undefined;
    } | ((item: Item) => {
        readonly className?: string | undefined;
        readonly style?: CSSProperties | undefined;
    } | undefined);
    readonly sortable?: boolean;
}
```

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  | Item field shown in the column; also the sort key and `searchFields` name. |
| `header` | `readonly header?: string;` | optional |  |
| `width` | `` readonly width?: number \| `${number}%`; `` | optional | Pixels or a percentage string (`'40%'`). |
| `align` | `readonly align?: 'start' \| 'end' \| 'center';` | optional |  |
| `format` | `readonly format?: Intl.NumberFormatOptions \| Intl.DateTimeFormatOptions \| ((value: unknown, item: Item) => string);` | optional | `Intl` options (numbers, dates) or a formatter. |
| `renderCell` | `readonly renderCell?: (props: {     readonly item: Item;     readonly value: unknown;     readonly text: string; }) => ReactNode;` | optional |  |
| `renderHeader` | `readonly renderHeader?: (props: {     readonly column: ComboboxColumn<Item>; }) => ReactNode;` | optional |  |
| `displayAsCheckbox` | `readonly displayAsCheckbox?: boolean;` | optional | Shows a boolean value as a checkbox mark. |
| `cellProps` | `` readonly cellProps?: {     readonly className?: string \| undefined;     readonly style?: CSSProperties \| undefined;     readonly [data: `data-${string}`]: string \| number \| boolean \| undefined; } \| ((item: Item) => {     readonly className?: string \| undefined;     readonly style?: CSSProperties \| undefined; } \| undefined); `` | optional | Extra props for every cell of the column. |
| `sortable` | `readonly sortable?: boolean;` | optional | Header click sorting for this column. Default `true`. |

### ComboboxFieldProps

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxFieldProps

```ts
interface DropdownFieldProps {
    readonly label?: ReactNode;
    readonly description?: ReactNode;
    readonly errorMessage?: ReactNode;
    readonly invalid?: boolean | undefined;
}
```

Field parts of `Select` and `Combobox` (the `TextField` names): a visible
label, a description and an error message around the control, wired with
`aria-labelledby` / `aria-describedby` / `aria-errormessage`. Without any
of them the markup is the bare control.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `label` | `readonly label?: ReactNode;` | optional | Visible label above the control; names it through `aria-labelledby` (an explicit `aria-labelledby` prop wins). |
| `description` | `readonly description?: ReactNode;` | optional | Help text below the control, referenced by `aria-describedby`. |
| `errorMessage` | `readonly errorMessage?: ReactNode;` | optional | Error text below the control, shown while `invalid`. |
| `invalid` | `readonly invalid?: boolean \| undefined;` | optional | Marks the control invalid: `aria-invalid`, `data-invalid` and the visible `errorMessage`. |

### ComboboxInputChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxInputChangeEvent

```ts
interface ComboboxInputChangeEvent {
    readonly source: DropdownEventSource;
    readonly reason: ComboboxInputChangeReason;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `readonly source: DropdownEventSource;` |  |  |
| `reason` | `readonly reason: ComboboxInputChangeReason;` |  |  |

### ComboboxItemRenderProps

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxItemRenderProps

```ts
interface DropdownItemRenderProps<Item> {
    readonly item: Item;
    readonly label: string;
    readonly selected: boolean;
    readonly active: boolean;
    readonly disabled: boolean;
    readonly matches: readonly (readonly [
        number,
        number
    ])[];
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `item` | `readonly item: Item;` |  |  |
| `label` | `readonly label: string;` |  |  |
| `selected` | `readonly selected: boolean;` |  |  |
| `active` | `readonly active: boolean;` |  |  |
| `disabled` | `readonly disabled: boolean;` |  |  |
| `matches` | `readonly matches: readonly (readonly [     number,     number ])[];` |  | `[start, end)` offsets of the matched text in `label` (with `highlightMatches` or a search). |

### ComboboxLocaleText

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxLocaleText

```ts
interface DropdownLocaleText {
    readonly noResults: string;
    readonly noData: string;
    readonly loading: string;
    readonly loadError: string;
    readonly retry: string;
    readonly selectAll: string;
    readonly deselectAll: string;
    readonly clear: string;
    readonly removeValue: (label: string) => string;
    readonly selectedCount: (count: number, plural: Intl.LDMLPluralRule) => string;
    readonly moreValues: (count: number) => string;
    readonly resultCount: (count: number, plural: Intl.LDMLPluralRule) => string;
    readonly limitReached: (max: number) => string;
    readonly search: string;
    readonly close: string;
    readonly toggle: string;
    readonly selectedValues: string;
    readonly create: (text: string) => string;
}
```

Static texts; every value has an exported default (`SELECT_DEFAULT_LOCALE_TEXT`).

Members (18):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `noResults` | `readonly noResults: string;` |  |  |
| `noData` | `readonly noData: string;` |  |  |
| `loading` | `readonly loading: string;` |  |  |
| `loadError` | `readonly loadError: string;` |  |  |
| `retry` | `readonly retry: string;` |  |  |
| `selectAll` | `readonly selectAll: string;` |  |  |
| `deselectAll` | `readonly deselectAll: string;` |  |  |
| `clear` | `readonly clear: string;` |  |  |
| `removeValue` | `readonly removeValue: (label: string) => string;` |  |  |
| `selectedCount` | `readonly selectedCount: (count: number, plural: Intl.LDMLPluralRule) => string;` |  |  |
| `moreValues` | `readonly moreValues: (count: number) => string;` |  |  |
| `resultCount` | `readonly resultCount: (count: number, plural: Intl.LDMLPluralRule) => string;` |  |  |
| `limitReached` | `readonly limitReached: (max: number) => string;` |  |  |
| `search` | `readonly search: string;` |  |  |
| `close` | `readonly close: string;` |  |  |
| `toggle` | `readonly toggle: string;` |  |  |
| `selectedValues` | `readonly selectedValues: string;` |  |  |
| `create` | `readonly create: (text: string) => string;` |  |  |

### ComboboxMultipleProps

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxMultipleProps

```ts
interface ComboboxMultipleProps<Item> extends ComboboxOwnProps<Item> {
    readonly multiple: true;
    readonly value?: readonly DropdownValue[];
    readonly defaultValue?: readonly DropdownValue[];
    readonly onValueChange?: (value: readonly DropdownValue[], event: DropdownValueChangeEvent<Item>) => void;
}
```

Members (82):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `multiple` | `readonly multiple: true;` |  |  |
| `value` | `readonly value?: readonly DropdownValue[];` | optional |  |
| `defaultValue` | `readonly defaultValue?: readonly DropdownValue[];` | optional |  |
| `onValueChange` | `readonly onValueChange?: (value: readonly DropdownValue[], event: DropdownValueChangeEvent<Item>) => void;` | optional |  |
| `data` | `data: readonly Item[] \| RemoteSource<Item>;` | inherited | Items (objects or primitives) or an `@salmonui/data` source. |
| `getItemValue` | `getItemValue?: ((item: Item) => CollectionKey);` | optional, inherited |  |
| `getItemLabel` | `getItemLabel?: ((item: Item) => string);` | optional, inherited |  |
| `getItemGroup` | `getItemGroup?: ((item: Item) => string \| null \| undefined);` | optional, inherited |  |
| `getItemIcon` | `getItemIcon?: ((item: Item) => ReactNode);` | optional, inherited |  |
| `isItemDisabled` | `isItemDisabled?: ((item: Item) => boolean);` | optional, inherited |  |
| `selectedItems` | `selectedItems?: readonly Item[];` | optional, inherited | Items of the current value that are not in loaded `data` (remote data, server labels). |
| `open` | `open?: boolean;` | optional, inherited |  |
| `defaultOpen` | `defaultOpen?: boolean;` | optional, inherited |  |
| `onOpenChange` | `onOpenChange?: ((open: boolean, event: DropdownOpenChangeEvent) => void);` | optional, inherited |  |
| `searchOperator` | `searchOperator?: SearchOperator<Item>;` | optional, inherited |  |
| `matchCase` | `matchCase?: boolean;` | optional, inherited | Case-sensitive search. Default `false`. |
| `ignoreAccents` | `ignoreAccents?: boolean;` | optional, inherited | Diacritics-insensitive search. Default `false`. |
| `debounce` | `debounce?: number;` | optional, inherited | Remote search delay in ms (local data filters on every keystroke). Default 300. |
| `minSearchLength` | `minSearchLength?: number;` | optional, inherited |  |
| `maxResults` | `maxResults?: number;` | optional, inherited |  |
| `searchFields` | `searchFields?: readonly string[];` | optional, inherited | Fields searched by a remote source (`query.search.columnIds`); default every field. |
| `query` | `query?: RemoteQuery;` | optional, inherited | Base query merged into every remote read. |
| `virtualization` | `virtualization?: boolean;` | optional, inherited | Windowed list; `true` by default above 100 items. |
| `maxVisibleItems` | `maxVisibleItems?: number;` | optional, inherited | Popup height in items. Default 8. |
| `popupMode` | `popupMode?: "auto" \| "popover" \| "sheet";` | optional, inherited | `'popover'` (default) anchors the popup; `'sheet'` is a full-screen dialog; `'auto'` picks the sheet on coarse-pointer phones at open time. |
| `clearable` | `clearable?: boolean;` | optional, inherited |  |
| `placeholder` | `placeholder?: string;` | optional, inherited |  |
| `disabled` | `disabled?: boolean;` | optional, inherited |  |
| `readOnly` | `readOnly?: boolean;` | optional, inherited |  |
| `name` | `name?: string;` | optional, inherited |  |
| `required` | `required?: boolean;` | optional, inherited |  |
| `form` | `form?: string;` | optional, inherited |  |
| `id` | `id?: string;` | optional, inherited |  |
| `autoFocus` | `autoFocus?: boolean;` | optional, inherited |  |
| `indicator` | `indicator?: "check" \| "checkbox";` | optional, inherited |  |
| `showSelectAll` | `showSelectAll?: boolean;` | optional, inherited |  |
| `maxSelected` | `maxSelected?: number;` | optional, inherited |  |
| `groupSelection` | `groupSelection?: boolean;` | optional, inherited |  |
| `hideSelected` | `hideSelected?: boolean;` | optional, inherited |  |
| `closeOnSelect` | `closeOnSelect?: boolean;` | optional, inherited |  |
| `maxVisibleValues` | `maxVisibleValues?: number;` | optional, inherited |  |
| `valueSeparator` | `valueSeparator?: string;` | optional, inherited | Separator of `valueDisplay="text"`; default `Intl.ListFormat` of `locale`. |
| `locale` | `locale?: string;` | optional, inherited | BCP 47 locale for list and plural formatting. Default `'en-US'` (identical on server and client). |
| `renderItem` | `renderItem?: ((props: DropdownItemRenderProps<Item>) => ReactNode);` | optional, inherited |  |
| `renderValue` | `renderValue?: ((props: { readonly items: readonly Item[]; readonly labels: readonly string[]; }) => ReactNode);` | optional, inherited |  |
| `renderChip` | `renderChip?: ((props: DropdownChipRenderProps<Item>) => ReactNode);` | optional, inherited |  |
| `renderGroupHeader` | `renderGroupHeader?: ((props: { readonly group: string; }) => ReactNode);` | optional, inherited |  |
| `renderEmpty` | `renderEmpty?: ((props: { readonly reason: "noData" \| "noMatch"; }) => ReactNode);` | optional, inherited |  |
| `renderError` | `renderError?: ((props: { readonly error: unknown; readonly retry: () => void; }) => ReactNode);` | optional, inherited |  |
| `renderLoading` | `renderLoading?: (() => ReactNode);` | optional, inherited |  |
| `popupHeader` | `popupHeader?: ReactNode;` | optional, inherited |  |
| `popupFooter` | `popupFooter?: ReactNode;` | optional, inherited |  |
| `getItemProps` | `getItemProps?: ((item: Item) => DropdownPartProps \| undefined);` | optional, inherited |  |
| `getChipProps` | `getChipProps?: ((item: Item) => DropdownPartProps \| undefined);` | optional, inherited |  |
| `highlightMatches` | `highlightMatches?: boolean;` | optional, inherited | Marks the matched characters with `<mark>`. |
| `loading` | `loading?: boolean;` | optional, inherited | Forces the loading state (set automatically while a remote read is pending). |
| `onLoadError` | `onLoadError?: ((error: unknown) => void);` | optional, inherited |  |
| `size` | `size?: "lg" \| "md" \| "sm";` | optional, inherited | Control size: `'sm'` 24px, `'md'` 32px (default), `'lg'` 40px tall. |
| `localeText` | `localeText?: Partial<DropdownLocaleText>;` | optional, inherited |  |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `classNames` | `classNames?: Partial<Record<DropdownPart, string>>;` | optional, inherited |  |
| `styles` | `styles?: Partial<Record<DropdownPart, CSSProperties>>;` | optional, inherited |  |
| `label` | `label?: ReactNode;` | optional, inherited | Visible label above the control; names it through `aria-labelledby` (an explicit `aria-labelledby` prop wins). |
| `description` | `description?: ReactNode;` | optional, inherited | Help text below the control, referenced by `aria-describedby`. |
| `errorMessage` | `errorMessage?: ReactNode;` | optional, inherited | Error text below the control, shown while `invalid`. |
| `invalid` | `invalid?: boolean;` | optional, inherited | Marks the control invalid: `aria-invalid`, `data-invalid` and the visible `errorMessage`. |
| `inputValue` | `inputValue?: string;` | optional, inherited | Text of the input (reactive); `onInputChange` reports every edit. |
| `defaultInputValue` | `defaultInputValue?: string;` | optional, inherited |  |
| `onInputChange` | `onInputChange?: ((text: string, event: ComboboxInputChangeEvent) => void);` | optional, inherited |  |
| `creatable` | `creatable?: boolean;` | optional, inherited | Committed text without a matching item becomes the value. Default `false`. |
| `onCreateItem` | `onCreateItem?: ((text: string) => Item \| null);` | optional, inherited | Builds the item for created text; `null` rejects it. Default: the text itself. |
| `autofill` | `autofill?: boolean;` | optional, inherited | Completes the first match inline (`aria-autocomplete="both"`). |
| `showTrigger` | `showTrigger?: boolean;` | optional, inherited | The dropdown button (not in the tab order). Default `true`. |
| `openOnClick` | `openOnClick?: boolean;` | optional, inherited | A click in the input opens the popup. Default `true`. |
| `commitOnBlur` | `commitOnBlur?: boolean;` | optional, inherited | Typed text is committed (created) when focus leaves. |
| `columns` | `columns?: readonly ComboboxColumn<Item>[];` | optional, inherited | Table popup (MultiColumn ComboBox): a lightweight `role="grid"`. |
| `rowHeight` | `rowHeight?: number;` | optional, inherited | Fixed row height of the `columns` popup in px. |
| `gridLines` | `gridLines?: "both" \| "default" \| "horizontal" \| "none" \| "vertical";` | optional, inherited |  |
| `striped` | `striped?: boolean;` | optional, inherited |  |
| `sorting` | `sorting?: boolean \| ComboboxSort;` | optional, inherited | Header sorting of the `columns` popup. Default `true`. |
| `ref` | `ref?: Ref<HTMLInputElement>;` | optional, inherited | The `<input role="combobox">`. |

### ComboboxOpenChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxOpenChangeEvent

```ts
interface DropdownOpenChangeEvent {
    readonly source: DropdownEventSource;
    readonly reason: DropdownOpenChangeReason;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `readonly source: DropdownEventSource;` |  |  |
| `reason` | `readonly reason: DropdownOpenChangeReason;` |  |  |

### ComboboxPartProps

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxPartProps

```ts
interface DropdownPartProps {
    readonly className?: string | undefined;
    readonly style?: CSSProperties | undefined;
    readonly [data: `data-${string}`]: string | number | boolean | undefined;
}
```

Pure per-item props merged onto the rendered option or chip (rendered items only).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `className` | `readonly className?: string \| undefined;` | optional |  |
| `style` | `readonly style?: CSSProperties \| undefined;` | optional |  |

### ComboboxSingleProps

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxSingleProps

```ts
interface ComboboxSingleProps<Item> extends ComboboxOwnProps<Item> {
    readonly multiple?: false;
    readonly value?: DropdownValue | null;
    readonly defaultValue?: DropdownValue | null;
    readonly onValueChange?: (value: DropdownValue | null, event: DropdownValueChangeEvent<Item>) => void;
}
```

Members (82):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `multiple` | `readonly multiple?: false;` | optional |  |
| `value` | `readonly value?: DropdownValue \| null;` | optional |  |
| `defaultValue` | `readonly defaultValue?: DropdownValue \| null;` | optional |  |
| `onValueChange` | `readonly onValueChange?: (value: DropdownValue \| null, event: DropdownValueChangeEvent<Item>) => void;` | optional |  |
| `data` | `data: readonly Item[] \| RemoteSource<Item>;` | inherited | Items (objects or primitives) or an `@salmonui/data` source. |
| `getItemValue` | `getItemValue?: ((item: Item) => CollectionKey);` | optional, inherited |  |
| `getItemLabel` | `getItemLabel?: ((item: Item) => string);` | optional, inherited |  |
| `getItemGroup` | `getItemGroup?: ((item: Item) => string \| null \| undefined);` | optional, inherited |  |
| `getItemIcon` | `getItemIcon?: ((item: Item) => ReactNode);` | optional, inherited |  |
| `isItemDisabled` | `isItemDisabled?: ((item: Item) => boolean);` | optional, inherited |  |
| `selectedItems` | `selectedItems?: readonly Item[];` | optional, inherited | Items of the current value that are not in loaded `data` (remote data, server labels). |
| `open` | `open?: boolean;` | optional, inherited |  |
| `defaultOpen` | `defaultOpen?: boolean;` | optional, inherited |  |
| `onOpenChange` | `onOpenChange?: ((open: boolean, event: DropdownOpenChangeEvent) => void);` | optional, inherited |  |
| `searchOperator` | `searchOperator?: SearchOperator<Item>;` | optional, inherited |  |
| `matchCase` | `matchCase?: boolean;` | optional, inherited | Case-sensitive search. Default `false`. |
| `ignoreAccents` | `ignoreAccents?: boolean;` | optional, inherited | Diacritics-insensitive search. Default `false`. |
| `debounce` | `debounce?: number;` | optional, inherited | Remote search delay in ms (local data filters on every keystroke). Default 300. |
| `minSearchLength` | `minSearchLength?: number;` | optional, inherited |  |
| `maxResults` | `maxResults?: number;` | optional, inherited |  |
| `searchFields` | `searchFields?: readonly string[];` | optional, inherited | Fields searched by a remote source (`query.search.columnIds`); default every field. |
| `query` | `query?: RemoteQuery;` | optional, inherited | Base query merged into every remote read. |
| `virtualization` | `virtualization?: boolean;` | optional, inherited | Windowed list; `true` by default above 100 items. |
| `maxVisibleItems` | `maxVisibleItems?: number;` | optional, inherited | Popup height in items. Default 8. |
| `popupMode` | `popupMode?: "auto" \| "popover" \| "sheet";` | optional, inherited | `'popover'` (default) anchors the popup; `'sheet'` is a full-screen dialog; `'auto'` picks the sheet on coarse-pointer phones at open time. |
| `clearable` | `clearable?: boolean;` | optional, inherited |  |
| `placeholder` | `placeholder?: string;` | optional, inherited |  |
| `disabled` | `disabled?: boolean;` | optional, inherited |  |
| `readOnly` | `readOnly?: boolean;` | optional, inherited |  |
| `name` | `name?: string;` | optional, inherited |  |
| `required` | `required?: boolean;` | optional, inherited |  |
| `form` | `form?: string;` | optional, inherited |  |
| `id` | `id?: string;` | optional, inherited |  |
| `autoFocus` | `autoFocus?: boolean;` | optional, inherited |  |
| `indicator` | `indicator?: "check" \| "checkbox";` | optional, inherited |  |
| `showSelectAll` | `showSelectAll?: boolean;` | optional, inherited |  |
| `maxSelected` | `maxSelected?: number;` | optional, inherited |  |
| `groupSelection` | `groupSelection?: boolean;` | optional, inherited |  |
| `hideSelected` | `hideSelected?: boolean;` | optional, inherited |  |
| `closeOnSelect` | `closeOnSelect?: boolean;` | optional, inherited |  |
| `maxVisibleValues` | `maxVisibleValues?: number;` | optional, inherited |  |
| `valueSeparator` | `valueSeparator?: string;` | optional, inherited | Separator of `valueDisplay="text"`; default `Intl.ListFormat` of `locale`. |
| `locale` | `locale?: string;` | optional, inherited | BCP 47 locale for list and plural formatting. Default `'en-US'` (identical on server and client). |
| `renderItem` | `renderItem?: ((props: DropdownItemRenderProps<Item>) => ReactNode);` | optional, inherited |  |
| `renderValue` | `renderValue?: ((props: { readonly items: readonly Item[]; readonly labels: readonly string[]; }) => ReactNode);` | optional, inherited |  |
| `renderChip` | `renderChip?: ((props: DropdownChipRenderProps<Item>) => ReactNode);` | optional, inherited |  |
| `renderGroupHeader` | `renderGroupHeader?: ((props: { readonly group: string; }) => ReactNode);` | optional, inherited |  |
| `renderEmpty` | `renderEmpty?: ((props: { readonly reason: "noData" \| "noMatch"; }) => ReactNode);` | optional, inherited |  |
| `renderError` | `renderError?: ((props: { readonly error: unknown; readonly retry: () => void; }) => ReactNode);` | optional, inherited |  |
| `renderLoading` | `renderLoading?: (() => ReactNode);` | optional, inherited |  |
| `popupHeader` | `popupHeader?: ReactNode;` | optional, inherited |  |
| `popupFooter` | `popupFooter?: ReactNode;` | optional, inherited |  |
| `getItemProps` | `getItemProps?: ((item: Item) => DropdownPartProps \| undefined);` | optional, inherited |  |
| `getChipProps` | `getChipProps?: ((item: Item) => DropdownPartProps \| undefined);` | optional, inherited |  |
| `highlightMatches` | `highlightMatches?: boolean;` | optional, inherited | Marks the matched characters with `<mark>`. |
| `loading` | `loading?: boolean;` | optional, inherited | Forces the loading state (set automatically while a remote read is pending). |
| `onLoadError` | `onLoadError?: ((error: unknown) => void);` | optional, inherited |  |
| `size` | `size?: "lg" \| "md" \| "sm";` | optional, inherited | Control size: `'sm'` 24px, `'md'` 32px (default), `'lg'` 40px tall. |
| `localeText` | `localeText?: Partial<DropdownLocaleText>;` | optional, inherited |  |
| `className` | `className?: string;` | optional, inherited |  |
| `style` | `style?: CSSProperties;` | optional, inherited |  |
| `classNames` | `classNames?: Partial<Record<DropdownPart, string>>;` | optional, inherited |  |
| `styles` | `styles?: Partial<Record<DropdownPart, CSSProperties>>;` | optional, inherited |  |
| `label` | `label?: ReactNode;` | optional, inherited | Visible label above the control; names it through `aria-labelledby` (an explicit `aria-labelledby` prop wins). |
| `description` | `description?: ReactNode;` | optional, inherited | Help text below the control, referenced by `aria-describedby`. |
| `errorMessage` | `errorMessage?: ReactNode;` | optional, inherited | Error text below the control, shown while `invalid`. |
| `invalid` | `invalid?: boolean;` | optional, inherited | Marks the control invalid: `aria-invalid`, `data-invalid` and the visible `errorMessage`. |
| `inputValue` | `inputValue?: string;` | optional, inherited | Text of the input (reactive); `onInputChange` reports every edit. |
| `defaultInputValue` | `defaultInputValue?: string;` | optional, inherited |  |
| `onInputChange` | `onInputChange?: ((text: string, event: ComboboxInputChangeEvent) => void);` | optional, inherited |  |
| `creatable` | `creatable?: boolean;` | optional, inherited | Committed text without a matching item becomes the value. Default `false`. |
| `onCreateItem` | `onCreateItem?: ((text: string) => Item \| null);` | optional, inherited | Builds the item for created text; `null` rejects it. Default: the text itself. |
| `autofill` | `autofill?: boolean;` | optional, inherited | Completes the first match inline (`aria-autocomplete="both"`). |
| `showTrigger` | `showTrigger?: boolean;` | optional, inherited | The dropdown button (not in the tab order). Default `true`. |
| `openOnClick` | `openOnClick?: boolean;` | optional, inherited | A click in the input opens the popup. Default `true`. |
| `commitOnBlur` | `commitOnBlur?: boolean;` | optional, inherited | Typed text is committed (created) when focus leaves. |
| `columns` | `columns?: readonly ComboboxColumn<Item>[];` | optional, inherited | Table popup (MultiColumn ComboBox): a lightweight `role="grid"`. |
| `rowHeight` | `rowHeight?: number;` | optional, inherited | Fixed row height of the `columns` popup in px. |
| `gridLines` | `gridLines?: "both" \| "default" \| "horizontal" \| "none" \| "vertical";` | optional, inherited |  |
| `striped` | `striped?: boolean;` | optional, inherited |  |
| `sorting` | `sorting?: boolean \| ComboboxSort;` | optional, inherited | Header sorting of the `columns` popup. Default `true`. |
| `ref` | `ref?: Ref<HTMLInputElement>;` | optional, inherited | The `<input role="combobox">`. |

### ComboboxSort

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxSort

```ts
interface ComboboxSort {
    readonly multiple?: boolean;
    readonly sortBy?: readonly SortDescriptor[];
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `multiple` | `readonly multiple?: boolean;` | optional | Ctrl / Cmd + click adds a sort level. |
| `sortBy` | `readonly sortBy?: readonly SortDescriptor[];` | optional | Initial and reactive sort. `columnId` is the column `field`. |

### ComboboxValueChangeEvent

Kind: interface

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxValueChangeEvent

```ts
interface DropdownValueChangeEvent<Item> {
    readonly source: DropdownEventSource;
    readonly reason: DropdownValueChangeReason;
    readonly previousValue: readonly DropdownValue[];
    readonly items: readonly Item[];
}
```

Second argument of `onValueChange`: frozen, read-only. `items` is materialized on first read.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `source` | `readonly source: DropdownEventSource;` |  |  |
| `reason` | `readonly reason: DropdownValueChangeReason;` |  |  |
| `previousValue` | `readonly previousValue: readonly DropdownValue[];` |  |  |
| `items` | `readonly items: readonly Item[];` |  | Items of the new value (loaded data, `selectedItems` or created items); computed on first read. |

## Types

### ComboboxEventSource

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxEventSource

```ts
type DropdownEventSource = 'pointer' | 'keyboard' | 'touch' | 'api';
```

How a change was made.

### ComboboxInputChangeReason

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxInputChangeReason

```ts
type ComboboxInputChangeReason = 'input' | 'select' | 'clear' | 'escape' | 'blur' | 'reset';
```

### ComboboxOpenChangeReason

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxOpenChangeReason

```ts
type DropdownOpenChangeReason = 'trigger' | 'keyboard' | 'type' | 'select' | 'escape' | 'outside' | 'tab' | 'blur';
```

### ComboboxPart

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxPart

```ts
type DropdownPart = 'root' | 'trigger' | 'input' | 'value' | 'popup' | 'list' | 'option' | 'group' | 'chip' | 'search';
```

### ComboboxProps

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxProps

```ts
type ComboboxProps<Item = unknown> = ComboboxSingleProps<Item> | ComboboxMultipleProps<Item>;
```

### ComboboxQuery

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxQuery

```ts
type DropdownQuery = RemoteQuery;
```

Base query merged into every remote read (filters and sort of the `@salmonui/data` query model).

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `filters` | `filters?: readonly FilterEntry[];` | optional, inherited |  |
| `sorting` | `sorting?: readonly SortDescriptor[];` | optional, inherited |  |

### ComboboxRemoteSource

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxRemoteSource

```ts
type RemoteSource<Item> = SharedRemoteSource<Item>;
```

A remote `data`: any `@salmonui/data` source (the structural `read` of `DataSource`).

Members (1):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `read` | `read: (request: DataSourceRequest) => DataSourceResult<Item> \| Promise<DataSourceResult<Item>>;` | inherited |  |

### ComboboxSearchOperator

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxSearchOperator

```ts
type SearchOperator<Item = unknown> = 'startsWith' | 'contains' | 'endsWith' | ((item: Item, text: string) => boolean);
```

A named operator or a predicate over the item and the raw search text.

### ComboboxValue

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxValue

```ts
type DropdownValue = CollectionKey;
```

A selectable value: what `getItemValue` returns and what `value` holds.

### ComboboxValueChangeReason

Kind: type

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/ComboboxValueChangeReason

```ts
type DropdownValueChangeReason = 'select' | 'deselect' | 'clear' | 'remove' | 'add' | 'create' | 'selectAll' | 'reset';
```

## Constants

### COMBOBOX_DEFAULT_LOCALE_TEXT

Kind: const

Page: https://salmonui.dev/docs/reference/dropdowns/combobox/COMBOBOX_DEFAULT_LOCALE_TEXT

```ts
const COMBOBOX_DEFAULT_LOCALE_TEXT: DropdownLocaleText;
```
