Skip to content

Transfer List for Angular

AngularInputs

Moves items between two lists, Available and Selected, such as team members, permissions, or report columns. Each list is a WAI-ARIA multi-select listbox with a search box and an item count; buttons move the checked or all visible items, Enter and double-click move too, and pointer drag between the lists is optional. Long lists are windowed. A Form control with one hidden input per selected value.

  • Two searchable listsAvailable and Selected, each with search and a live item count.
  • Keyboard firstMulti-select listboxes: Space, Shift ranges, Ctrl+A, Enter to move, type-ahead.
  • Drag, optionallyDrag items between the lists; the move buttons are always the alternative.
  • 10,000 itemsWindowed rows keep long lists fast, with positions announced in the full list.
  • Form readyRequired, minimum, and maximum counts; one hidden input per selected value.

Behavior, design tokens, and limitations are described on the Transfer List page; this page covers the Angular API.

import { Component } from '@angular/core';
import type { TransferListItem } from '@absoluteui/components/transfer-list';
import { AuiTransferList } from '@absoluteui/angular/transfer-list';
@Component({
selector: 'app-team-picker',
imports: [AuiTransferList],
template: `<aui-transfer-list label="Project team" [items]="people" [(value)]="team"></aui-transfer-list>`,
})
export class TeamPickerComponent {
readonly people: TransferListItem[] = [
{ value: 'e1', label: 'Asha Rao' },
{ value: 'e2', label: 'Ben Okafor' },
];
team: string[] = ['e2'];
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiTransferList } from '@absoluteui/angular/transfer-list';

Defaults for every instance: provideAbsoluteUIConfig({ components: { transferList: { ... } } }) (see Configuration).

Class AuiTransferList; template reference #ref="auiTransferList".

Server rendering: Renders on the server; the browser re-creates it after hydration.

Angular forms: implements ControlValueAccessor and Validator; the form value is string[]. Bind [formControl], formControlName, or [(ngModel)]; validation messages of the component report through the aui error key. See Forms.

Input Type Default Description
label string Required. Visible label of the control; names the group.
hideLabel boolean false Visually hide the label.
description string Help text, referenced by the group.
items readonly TransferListItem[] Required. All items { value, label, description?, disabled? }; values are unique.
name string Form field name: one hidden input per selected value.
required boolean false At least one item must be selected.
minSelected number At least this many items when any are selected (or when required).
maxSelected number Hard limit; moves beyond it are refused and announced.
disabled boolean false Disable the control.
readOnly boolean false Lists can be browsed and searched, but nothing moves.
searchable boolean true Show a search box above each list.
draggable boolean false Drag items between the lists with a pointer.
titles { readonly available?: string; readonly selected?: string; } List titles (default Available and Selected).
visibleRows number '8' Rows visible in each list before it scrolls (3 to 50).
validate (value: readonly string[]) => string | null Consumer validation; return a message to mark the value invalid.
icons Partial<TransferListIcons> Icon overrides.
validationTiming ValidationTiming 'blur' When validation messages appear.
locale string 'en-US' Locale of counts, messages, and search matching.
Model Type Change output Description
[(value)] string[] (valueChange) The value: [(value)] without forms; with Angular forms, bind the form control instead.
Output Payload Description
(changed) TransferListValueDetail Items moved: { value, validity, moved, to }. Re-emits aui-change.

Call them through a viewChild query or a template reference.

Method Description
getFormValue(): string[] | undefined The value for Form serialization.
reportValidity(): boolean | undefined Show messages now and return validity.
setCustomError(message: string | null): void Show or clear an external error.
focus(): void Focus the Available list.
reset(): void Restore the initial value and clear searches, checks, and messages.

Pattern: WAI-ARIA APG Listbox (multi-select, recommended selection model): each list is role=listbox with aria-multiselectable; focus stays on the listbox and aria-activedescendant names the active option; aria-selected marks checked options.

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Transfer List: Accessibility and performance.