TransferList
Components

TransferList

Assign items between two searchable lists using controlled target IDs.

TransferItem type

Each item in the list is a TransferItem with the following shape.

TransferItem props
PropTypeDefaultDescription
idstring—Unique identifier for the item.
labelReactNode—Primary row label.
metaReactNode—Dim right-aligned secondary text (e.g. "14 accounts").
searchstring—Matched against the search box (labels can be nodes, so search needs a plain string).

Props

TransferListProps props
PropTypeDefaultDescription
itemsTransferItem[]—All available items.
targetIdsstring[]—Ids currently on the right (assigned) side; everything else appears on the left.
onChange(targetIds: string[]) => void—Called with the updated targetIds.
titles[ReactNode, ReactNode]["Available", "Assigned"]Column header titles as a 2-tuple [left, right].
searchablebooleantrueShow search boxes above each list.
listHeightnumber168List body height in px.

Specimens

Basic

Default transfer list with "Available" / "Assigned" titles and built-in search. Check rows and use the arrows to move them.

TransferList

Custom titles

Override the column titles with the titles prop. Use this to give the columns domain-specific names like "Unassigned Reps" / "Territory Reps".

TransferList: custom titles

Searchable

Search is enabled by default (searchable=true). It filters rows in each column independently. Set it to false to hide the search boxes for simple pickers.

TransferList: searchable false

Import

ImportTSX
import { TransferList } from "@solarius/onset";
import type { TransferItem } from "@solarius/onset";