Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

PickList

Transfer items between available and selected lists with controlled arrays.

Category
Forms and selection
Import
@neural-ui/core/pick-list
Selector
neu-pick-list
import { NeuPickListComponent } from '@neural-ui/core/pick-list';

Usage

Apply itemsChange.source and itemsChange.target together so an item is never duplicated across lists. sourceChange and targetChange expose individual proposals, while itemsChange is the complete transfer. moveAllScope="filtered" moves only visible eligible items; "all" uses the full eligible collection. Disabled items cannot be moved.

Examples

Try this application-owned interaction. Its event handling and initial data are included in Code.

Examples

Available

Selected

No matching projects

Events: 0

Try and configure

Change the public options, try the result and inspect the updated template. Code contains the complete executable implementation.

Try and configure

Available

Selected

No matching projects

Events: 0

template.html
<neu-pick-list
  [source]="available()"
  [target]="chosen()"
  [filter]="true"
  [dragDrop]="false"
  (itemsChange)="
    available.set($event.source);
    chosen.set($event.target);
    record('itemsChange', $event)
  "
  [sourceHeader]="'Available'"
  [targetHeader]="'Selected'"
  [emptyFilterLabel]="'No matching projects'"
  [filterPlaceholder]="'Search projects'"
  [sourceFilterLabel]="'Filter available projects'"
  [targetFilterLabel]="'Filter selected projects'"
></neu-pick-list>

State and events

Apply itemsChange.source and itemsChange.target together so an item is never duplicated across lists. sourceChange and targetChange expose individual proposals, while itemsChange is the complete transfer. moveAllScope="filtered" moves only visible eligible items; "all" uses the full eligible collection. Disabled items cannot be moved.

Accessibility and keyboard

Use Tab to reach items and transfer buttons. Enter or Space selects an item or activates a transfer button. These controls remain available when dragDrop is false.

Key
Action
Tab Move through item buttons and the available reorder or transfer buttons.
Enter Select the focused item or activate the focused reorder/transfer button. Dragging is not required.
Space Select the focused item or activate the focused reorder/transfer button. Dragging is not required.

API

Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.

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
dragDropbooleanfalse[dragDrop]Enable optional pointer drag/drop; keyboard and button operations remain available.
emptyFilterLabelstring'No matching items'[emptyFilterLabel]Text displayed when filtering produces no matching entries.
filterbooleanfalse[filter]Changed raw search query from user input.
filterConfigReadonly<NeuOptionFilterConfig<T>>{}[filterConfig]Fields, matching mode, locale and client/server filtering strategy.
filterPlaceholderstring'Filter items'[filterPlaceholder]Accessible name or placeholder for the corresponding list filter.
moveAllScopeNeuPickListMoveAllScope'filtered'[moveAllScope]Choose whether move-all transfers the filtered visible entries or all eligible entries.
optionDisabledNeuOptionDisabledAccessor<T> | nullnull[optionDisabled]Field name or function that marks an option as disabled.
optionLabelNeuOptionLabelAccessor<T> | nullnull[optionLabel]Field name or function used to obtain the visible option label.
optionValueNeuOptionValueAccessor<T, V> | nullnull[optionValue]Field name or function used to obtain the stored option value.
sourcereadonly T[][][source]Applied collection on the corresponding available or selected side.
sourceFilterLabelstring'Filter available items'[sourceFilterLabel]Accessible name or placeholder for the corresponding list filter.
sourceFilterValuestring | nullnull[sourceFilterValue]Applied text filter; null leaves filter text owned by the component.
sourceHeaderstring'Available'[sourceHeader]Visible heading for the corresponding transfer list.
sourceSelectionKeysreadonly V[] | undefinedundefined[sourceSelectionKeys]Applied stable option values for selected entries. Undefined uses the local selection mode.
targetreadonly T[][][target]Applied collection on the corresponding available or selected side.
targetFilterLabelstring'Filter selected items'[targetFilterLabel]Accessible name or placeholder for the corresponding list filter.
targetFilterValuestring | nullnull[targetFilterValue]Applied text filter; null leaves filter text owned by the component.
targetHeaderstring'Selected'[targetHeader]Visible heading for the corresponding transfer list.
targetSelectionKeysreadonly V[] | undefinedundefined[targetSelectionKeys]Applied stable option values for selected entries. Undefined uses the local selection mode.

Outputs

Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.

Name
Payload
Template binding
Description
itemDropNeuPickListDropEvent<T>(itemDrop)="onItemDrop($event)"Reports a pointer/keyboard drop with item, list locations and indexes. Apply the associated state proposal to accept it.
itemsChange{ source: T[]; target: T[]; }(itemsChange)="onItemsChange($event)"Proposes both source and target arrays. Apply them together to accept an atomic transfer.
sourceChangeT[](sourceChange)="onSourceChange($event)"Proposes the replacement collection on the corresponding side of PickList.
sourceFilterChangestring(sourceFilterChange)="onSourceFilterChange($event)"Proposes the text filter for the corresponding list.
sourceSelectionChangeT[](sourceSelectionChange)="onSourceSelectionChange($event)"Reports the selected item objects on the corresponding list.
targetChangeT[](targetChange)="onTargetChange($event)"Proposes the replacement collection on the corresponding side of PickList.
targetFilterChangestring(targetFilterChange)="onTargetFilterChange($event)"Proposes the text filter for the corresponding list.
targetSelectionChangeT[](targetSelectionChange)="onTargetSelectionChange($event)"Reports the selected item objects on the corresponding list.

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.

Name
Mechanism
Contract
NeuPickListItemDirectiveView example Public template directive (entrypoint)ng-template[neuPickListItem]

Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.

NeuPickListItemDirective

NeuPickListItemDirective

NeuPickListItemDirective

Available

Selected

No matching projects

Events: 0

Public Types

Open a type to inspect its definition and interface fields.

Styles and tokens

Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.

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-border-hover Control borders on hover Shared by other Core consumers; scope the override. rgba(15, 23, 42, 0.16)
--neu-primary Brand color for active controls and emphasis Shared by other Core consumers; scope the override. #007aff
--neu-surface Main field, header or control surface Shared by other Core consumers; scope the override. #ffffff
--neu-surface-2 Secondary surfaces and alternating rows Shared by other Core consumers; scope the override. #f1f5f9
--neu-text Main text and inherited icon color Shared by other Core consumers; scope the override. #0f172a
--neu-transition Timing of state changes Shared by other Core consumers; scope the override. 200ms ease