# Combobox (@limerdev/zest) A text input with a list of options, filtered as the user types: `` (`type="single"` or `"multiple"`, `bind:value`, `items`, `name`) holds a `Combobox.Input` (styled like `Input`, with a button that opens the list) and a `Combobox.Content`. Given `items`, `` draws those whose label contains the typed text, or `emptyText` when none do. For your own filtering (a search on the server, say) or markup, give the content `Combobox.Item`s (`value`, `label`), optionally in `Combobox.Group`s with a `Combobox.GroupHeading`, and read the typed text from the input's `oninput`. Arrow keys move, Enter chooses, Escape closes. Inside a `Field` the input is labelled, described and marked invalid by the Field. - Category: Data input - Import: `import { Combobox } from '@limerdev/zest'` - Bits UI: `Combobox`, https://bits-ui.com/docs/components/combobox - Exports: `Combobox.Root`, `Combobox.Input`, `Combobox.Trigger`, `Combobox.Content`, `Combobox.Item`, `Combobox.Group`, `Combobox.GroupHeading`, `Combobox.Portal` - Use for: Choosing from a long list by typing: a customer, a project, a country. - Don't: A short list people don't need to search: use `Select`. Running commands: use `Command`. ```svelte Customer ``` Props of `Combobox.Root`: - `allowDeselect` (`boolean`): Whether to allow the user to deselect an item by clicking on an already selected item. This is only applicable to `type="single"` selects/comboboxes. - `disabled` (`boolean`, default `false`): Whether the combobox is disabled. - `inputValue` (`string`): A read-only value that can be used to programmatically update the input value. This is useful for updating the displayed label/input when the value changes outside of Bits UI. - `items` (`{ value: string; label: string; disabled?: boolean | undefined; }[]`): Optionally provide an array of `value` and `label` pairs that will be used to match and trigger selection when the trigger is focused and a key is pressed while the content is closed. It's also used to handle form autofill. By providing this value, you enable selecting a value when the trigger is focused and a key is pressed without the content being open, similar to how a native `