Combobox
Formsatlas-comboboxExamples
Searchable
Type to filter the options; the empty text shows when nothing matches.
Value: —
With Signal Forms
Bind the combobox with [formField] : required state, errors and touched come from the form. In atlas-form-field the label names it and the error describes it.
Search texts and disabled options
searchPlaceholder and emptyText replace the configured search texts for one combobox (set them app-wide in the config). Disabled options are listed but cannot be chosen.
API
Generated from the library source, so it always matches the code.
AtlasComboboxComponent atlas-combobox
| Input | Type | Default | Description |
|---|---|---|---|
| options required | ComboboxOption[] | — | disabled options cannot be chosen. |
| value two-way | string | '' | value ; '' when nothing is selected (two-way, or Signal Forms [field] ). |
| disabled | boolean | false | [field] . |
| errors | readonly ValidationError.WithOptionalFieldTree[] | [] | [field] . |
| required | boolean | false | [field] . |
| invalid | boolean | false | [field] . |
| touched | boolean | false | [field] . |
| readonly | boolean | false | [field] . |
| pending | boolean | false | [field] . |
| name | string | '' | [field] . |
| placeholder | string | undefined | undefined | select.placeholder . |
| searchPlaceholder | string | undefined | undefined | combobox.searchPlaceholder . |
| emptyText | string | undefined | undefined | combobox.emptyText . |
| ariaLabel | string | null | null | |
| inputId | string | undefined | undefined | id of the focusable element, so a visible <label atlasLabel for="…"> names it. Inside atlas-form-field the field supplies one. |
| ariaDescribedBy | string | null | null | aria-describedby , merged with the surrounding form field's hint or error. |
| class | string | '' | cn() ; yours win on conflicts. |
| Output | Payload | Description |
|---|---|---|
| touch | void |
Types
ComboboxOption
| Property | Type | Description |
|---|---|---|
| value | string | |
| label | string | |
| disabled? | boolean |