AutoComplete
An editable Signal-first combobox for local filtering, race-safe remote suggestions, typed templates and every Angular Forms API.
GET STARTED
Import
Use the concise public NeuralAutoComplete export from its tree-shakable entry point.
Local suggestions and nested paths
Map label, value, disabled and group fields without changing source objects. Search can span comma-separated nested paths; Paris is disabled.
ISTESBAMSBERLHRCDGFree text mode
valueMode="text" keeps the committed form value synchronized with editable text. Disable force selection to accept values outside the suggestion list.
Remote and race-safe
Remote mode never filters supplied results. Every debounced request carries an increasing id so stale responses can be discarded deterministically.
Angular Forms
The same nullable committed-value model implements Signal Forms, Reactive Forms and template-driven Forms. Programmatic writes do not emit user-only selection events.
Typed content and icon templates
Option, group, empty, loading, dropdown icon and clear icon contexts are all type guarded. The example replaces both action icons while preserving their accessible buttons.
States, labels and Field composition
Disabled, readonly, loading, empty, required, pending and invalid are distinct. Locale messages supply placeholder and action labels unless a component-level override is set.
Semantic events
Models describe state; semantic outputs describe user intent and popup lifecycle. No legacy on-prefixed aliases are needed.
Unstyled and typed class slots
Headless mode keeps structure, top-layer positioning, keyboard behavior, localization and Forms while consumer classes own every visible pixel.
Beta boundaries
Included
Single option or text value, local/remote data, groups, nested paths, typed templates, localization, Forms and headless ownership.
Use another primitive
Use MultiSelect for chips/multiple values and Select with virtual scroll for very large fixed option sets. Grid popups and inline creation are not Beta behavior.
ACCESSIBILITY
Editable combobox by contract
The implementation follows the ARIA editable combobox/listbox model while keeping native input focus stable.
Semantics
The input exposes role="combobox", aria-autocomplete="list", expanded, controls, active descendant, busy, readonly and invalid states. Results use listbox, option, selected and disabled semantics.
Keyboard
Arrow Down/Up opens and navigates enabled results, Home/End jump, Enter commits, Escape closes, and Tab preserves the natural focus sequence. The dropdown button is independently keyboard operable.
Focus, touch and IME
DOM focus never moves into options; aria-activedescendant exposes the active result. Blur emits touch and applies force selection. Composition events suppress partial CJK/IME search requests.
Readonly and disabled
Readonly remains enabled, focusable and inspectable but blocks input, selection, clear and blur mutations. Disabled uses the native state and closes an open popup. Disabled options are skipped.
Localization and direction
Placeholder, empty, loading, clear and dropdown messages come from NeuralLocaleService with direct input overrides. Logical popup placement follows RTL automatically; locale-aware filtering can use filterLocale.
PUBLIC CONTRACT
AutoComplete API
Models
| value | TValue | string | null | null | Committed value; creates valueChange. |
| query | string | '' | Editable input text; creates queryChange. |
Data inputs
| options | readonly TOption[] | [] | Immutable local or remote result source. |
| optionLabel | string | 'label' | Display label path; nested paths work. |
| optionValue | string | 'value' | Committed value path; nested paths work. |
| optionDisabled | string | 'disabled' | Disabled state path. |
| optionGroup | string | '' | Optional group label path. |
| dataMode | 'local' | 'remote' | 'local' | Own filtering or accept remote results. |
| valueMode | 'option' | 'text' | 'option' | Commit mapped values or free text. |
| filterMode | 'contains' | 'startsWith' | 'endsWith' | 'contains' | Local match strategy. |
| filterBy | string | '' | Comma-separated searchable property paths. |
| filterLocale | string | '' | Locale for case folding. |
| compareWith | function | Object.is | Custom committed-value equality. |
| limit | number | 50 | Maximum rendered results. |
Behavior inputs
| minLength | number | undefined | 1 | Minimum query length before search. |
| delay | number | 250 | Debounce time in milliseconds. |
| forceSelection | boolean | true | Reject unmatched text in option mode. |
| completeOnFocus | boolean | false | Search when input receives focus. |
| showDropdown | boolean | false | Shows the reveal-all button. |
| clearable | boolean | false | Shows clear while mutable and non-empty. |
| autoComplete | string | 'off' | Native autocomplete attribute. |
State, labels and styling inputs
| loading | boolean | false | Busy state and loading content. |
| disabled | boolean | false | Native disabled state. |
| readonly | boolean | false | Focusable inspection without mutation. |
| required | boolean | false | Native and Field required state. |
| invalid | boolean | false | Invalid ARIA and visual state. |
| pending | boolean | false | Busy ARIA form state. |
| touched | boolean | false | Forms interaction state. |
| dirty | boolean | false | Forms mutation state. |
| name | string | '' | Template-driven form name. |
| fluid | boolean | false | Fills available inline size. |
| placeholder | string | locale | Localized input placeholder override. |
| emptyLabel | string | locale | Localized empty result override. |
| loadingLabel | string | locale | Localized loading override. |
| clearLabel | string | locale | Clear button accessible label. |
| dropdownLabel | string | locale | Dropdown button accessible label. |
| ariaLabel | string | '' | Direct combobox accessible name. |
| autoCompleteId | string | generated | Stable control id override. |
| dropdownIconClass | string | 'nt-chevron-down' | Dropdown Neural Icon class. |
| clearIconClass | string | 'nt-x' | Clear Neural Icon class. |
| loadingIconClass | string | 'nt-loader-3 nt-spin' | Busy Neural Icon classes. |
| unstyled | boolean | false | Removes NeuralNg visual classes. |
| autoCompleteClass | string | '' | Additive root class. |
| classes | NeuralAutoCompleteClasses | {} | Typed additive slot classes. |
Outputs
| valueChange | TValue | string | null | Committed model changes. |
| queryChange | string | Editable query changes. |
| search | NeuralAutoCompleteSearchEvent | Debounced query, requestId and reason. |
| selected | NeuralAutoCompleteSelectEvent | User commit with option, previous value and source. |
| cleared | NeuralAutoCompleteClearEvent | Explicit clear with previous value and query. |
| opened / closed | void | Popover visibility lifecycle. |
| invalidInput | NeuralAutoCompleteInvalidInputEvent | Rejected force-selection query. |
| touch | void | Native input blur. |
Methods
focus(options?: FocusOptions)Moves DOM focus to the native input.
reset()Clears value/query, pending search and panel without a user selection event.
Typed template directives
neuralAutoCompleteOptionContext: $implicit, option, resolved, label, value, index, active, selected, disabled
neuralAutoCompleteGroupContext: $implicit, group
neuralAutoCompleteEmptyContext: $implicit localized label
neuralAutoCompleteLoadingContext: $implicit localized label
neuralAutoCompleteDropdownIconContext: $implicit, className
neuralAutoCompleteClearIconContext: $implicit, className
Typed class slots
rootinputGroupinputclearButtondropdownButtonloadingIndicatoriconpanellistgroupoptionactiveOptionselectedOptiondisabledOptionemptyMessageloadingMessageDESIGN TOKENS
AutoComplete tokens
Neutral tokens inherit the active primary, surface and resolved light/dark mode. Glass and Futuristic only override tokens; user classes remain additive.
--neural-auto-complete-widthComponent inline size.
--neural-auto-complete-colorComponent foreground color.
--neural-auto-complete-font-familyComponent font family.
--neural-auto-complete-borderComponent border shorthand.
--neural-auto-complete-radiusComponent corner radius.
--neural-auto-complete-backgroundComponent background surface.
--neural-auto-complete-shadowComponent box shadow.
--neural-auto-complete-backdrop-filterComponent backdrop filter effect.
--neural-auto-complete-panel-max-heightPanel maximum block size.
--neural-auto-complete-panel-colorPanel foreground color.
--neural-auto-complete-panel-backgroundPanel background surface.
--neural-auto-complete-panel-radiusPanel corner radius.