TreeSelect keeps the hierarchy visible in its panel. Single mode stores one node value; multiple mode stores an array. Independent selection affects only the chosen node; propagated selection follows parent/child relationships.
Expansion is controlled: bind expandedKeys and apply expandedKeysChange. For lazy nodes, childrenRequest asks the application to supply child records; it does not fetch them itself.
Bind FormField to the value-owning control and add required to the form schema. Select a destination, leave the field to mark it touched, and reset it to check both value and validation state. A required marker on its own does not validate your form.
Change the settings below and interact with the live control. The preview, current application value and generated template stay together. A disabled destination lets you check that unavailable choices cannot be selected.
Use one source of truth: [(value)]="destination" or [value]="destination()" with (valueChange)="destination.set($event)". Do not bind both forms at once.
Inputs configure the control. valueChange synchronizes its model; the other Outputs report their documented actions or lifecycle. Requests for suggestions, children or remote windows require the application to supply data.
Use a visible label or an accessible name. Test keyboard navigation, disabled options, selection and closing the panel. Custom option templates should keep descriptive text and must not introduce a nested button or another focusable checkbox inside the option.
Key
Action
Tab
Moves focus into or out of the control.
ArrowDown / ArrowUp
Moves the active option through available options.
Enter
Activates the focused option.
Escape
Closes the panel without selecting another option.
The reference lists the public Inputs, models, Outputs and Templates from the pinned Core package. Click a named type to open its definition. Each applicable Template has an executable example and its actual source.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Name
Type
Default
Template binding
Description
clearable
boolean
false
[clearable]
Shows a clear action when a value is selected.
clearLabel
string
'Clear selection'
[clearLabel]
Label for the clear-selection action.
disabled
boolean
false
[disabled]
Disables user interaction; disabled options cannot be selected.
emptyLabel
string
'No options found'
[emptyLabel]
Message displayed when there are no available options.
expandedKeys
readonly V[]
[]
[expandedKeys]
Applied node expansion keys. Accept expandedKeysChange by updating this input.
label
string
''
[label]
Visible field or option label.
mode
M
'single' as MDerived default
[mode]
Selection mode. The accepted value shape follows the chosen mode.
nodes
readonly T[]
[]
[nodes]
Root node records. Child relationships come from optionChildren.
Notifies the form that the control has been touched; not a value change.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
Open a type to inspect its definition and interface fields.
NeuIndexRange.d.ts
import type { NeuIndexRange } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export interface NeuIndexRange {
readonly end: number;
readonly start: number;
}
NeuOptionAccessor.d.ts
import type { NeuOptionPath } from '@neural-ui/core/option-api';
import type { NeuOptionAccessor } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionAccessor<T, R = unknown> = Exclude<keyof T, string> | NeuOptionPath<T> | ((option: T) => R);
NeuOptionDisabledAccessor.d.ts
import type { NeuOptionAccessor } from '@neural-ui/core/option-api';
import type { NeuOptionDisabledAccessor } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionDisabledAccessor<T> = NeuOptionAccessor<T, boolean>;
NeuOptionLabelAccessor.d.ts
import type { NeuOptionAccessor } from '@neural-ui/core/option-api';
import type { NeuOptionLabelAccessor } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionLabelAccessor<T> = NeuOptionAccessor<T, string>;
NeuOptionPath.d.ts
import type { NeuOptionPath } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionPath<T> = Extract<keyof T, string> | `${Extract<keyof T, string>}.${string}`;
NeuOptionValueAccessor.d.ts
import type { NeuOptionAccessor } from '@neural-ui/core/option-api';
import type { NeuOptionValueAccessor } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuOptionValueAccessor<T, V> = NeuOptionAccessor<T, V>;
NeuSelectionMode.d.ts
import type { NeuSelectionMode } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuSelectionMode = 'single' | 'multiple';
NeuSelectionValue.d.ts
import type { NeuSelectionMode } from '@neural-ui/core/option-api';
import type { NeuSelectionValue } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export type NeuSelectionValue<V, M extends NeuSelectionMode> = M extends 'multiple' ? readonly V[] : V | null;
NeuTreeSelectChildrenRequest.d.ts
import type { NeuTreeSelectChildrenRequest } from '@neural-ui/core/tree-select';
// Public declaration (reference only)
export interface NeuTreeSelectChildrenRequest<K> {
readonly parentKey: K;
readonly queryRevision: number;
readonly requestId: number;
}
NeuTreeSelectNode.d.ts
import type { NeuTreeSelectNode } from '@neural-ui/core/tree-select';
// Public declaration (reference only)
export interface NeuTreeSelectNode {
children?: NeuTreeSelectNode[];
data?: unknown;
disabled?: boolean;
label: string;
lazy?: boolean;
value: string;
}
NeuTreeSelectNodeTemplateContext.d.ts
import type { NeuTreeSelectNode } from '@neural-ui/core/tree-select';
import type { NeuTreeSelectNodeTemplateContext } from '@neural-ui/core/tree-select';
// Public declaration (reference only)
export interface NeuTreeSelectNodeTemplateContext<T = NeuTreeSelectNode> {
$implicit: T;
level: number;
selected: boolean;
toggle: () => void;
}
NeuTreeSelectSelectionStrategy.d.ts
import type { NeuTreeSelectSelectionStrategy } from '@neural-ui/core/tree-select';
// Public declaration (reference only)
export type NeuTreeSelectSelectionStrategy = 'independent' | 'propagated';
NeuTreeSelectVirtualizationOptions.d.ts
import type { NeuTreeSelectVirtualizationOptions } from '@neural-ui/core/tree-select';
// Public declaration (reference only)
export interface NeuTreeSelectVirtualizationOptions {
readonly buffer?: number;
readonly enabled?: boolean;
readonly itemSize?: number;
readonly viewportHeight?: number;
}
NeuViewportRange.d.ts
import type { NeuIndexRange } from '@neural-ui/core/option-api';
import type { NeuViewportRange } from '@neural-ui/core/option-api';
// Public declaration (reference only)
export interface NeuViewportRange {
readonly render: NeuIndexRange;
readonly visible: NeuIndexRange;
}
Load Core styles once. Use the public tokens below for local customization or a preset for application-wide changes. Keep labels, focus, selected options and disabled states readable in both light and dark themes.
Specific tokens
This component uses shared theme tokens rather than dedicated component hooks.
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.
Token
Purpose here
Other impact
Default / fallback
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-focus-ring
Normal keyboard-focus ring
Shared by other Core consumers; scope the override.