Combobox

Searchable select input with a custom option template.

Usage

PreviewCode

API Reference

VoltComboboxButton — volt-combobox-button

InputTypeDefault
id string `volt-combobox-button-${++nextComboboxButtonId}`

VoltComboboxDropdown — volt-combobox-dropdown

InputTypeDefault
id string `volt-combobox-dropdown-${++nextComboboxDropdownId}`

VoltComboboxInput — input[voltComboboxInput]

InputTypeDefault
id unknown

VoltComboboxOption — volt-combobox-option

InputTypeDefault
value *unknown
disabled boolean false
index number | undefined
OutputType
activatedvoid

VoltCombobox — volt-combobox

InputTypeDefault
id string `volt-combobox-${++nextComboboxId}`
label string
value unknown
multiple boolean false
disabled boolean false
allowDeselect boolean true
compareWith (a: unknown, b: unknown) => boolean Object.is
dropdownPlacement NgpComboboxPlacement 'bottom'
container string | HTMLElement | null 'body'
flip NgpFlipInput true
scrollToOption ((index: number) => void) | undefined undefined
allOptions unknown[] | undefined undefined
items unknown[] []
placeholder string 'Select...'
itemLabel (item: unknown) => string item => typeof item === 'string' ? item : String(item)
trackByFn (index: number, item: unknown) => unknown (_i, item) => item
OutputType
valueChangeunknown

Component Source

Install via CLI:npx @voltui/cli add combobox
TypeScript
Loading editor…

Copy this code to your project. The component uses ng-primitives/combobox.