Skip to content
Thrum

Transfer list

Two lists side by side with buttons between them: pick items on the left and move them to the right, such as the permissions a role grants. Each side searches, counts and selects all. For a short set of on and off choices, a checkbox group is lighter.

Install

npx shadcn@latest add @thrum-pro/transfer-list

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Automatically installs icons check, chevron-down, chevron-right, chevron-up and chevrons-right from the icon set.

Data shape

Type
type TransferItem = { id: string; label: string; description?: string; disabled?: boolean };
Sample
const permissions: TransferItem[] = [
  { id: "perm-0", label: "Read invoices" },
  { id: "perm-1", label: "Issue refunds", description: "Refund a paid invoice" },
];

Props

PropTypeDefaultDescription
itemsTransferItem[]RequiredEvery item, in the order the source list shows them. Ids are unique across both lists.
valuestring[]–The ids in the target list, in order, when the parent holds them. Use it with onValueChange.
defaultValuestring[]Default []The ids in the target list at first, when the component holds them itself.
onValueChange(ids: string[]) => void–Called with the target list's ids, in order, after every move or reorder.
sourceLabelstringDefault "Available"The source list's name. It heads the list and names it for screen readers.
targetLabelstringDefault "Selected"The target list's name.
searchablebooleanDefault trueA search field over each list, matching the label and the description.
reorderablebooleanDefault falseMove up and Move down buttons under the target list, and Alt with the arrow keys, for its order.
emptyLabelstringDefault "No items"Shown in a list with nothing in it.
soundbooleanDefault truePlay a rising click when items join the target and a falling one when they leave it, if the visitor has sound on.
classNamestring–Extra classes for the root, merged last.
moveWithin()function–More exports: the order after moving the selected ids one place up or down.

Motion and sound

Motion

  • Newly moved rows flash a subtle highlight ring that fades over 150 ms.
  • Reduced motion: rows appear in the other list with no transition.

Sound

  • A rising click when items join the target list and a falling one when they leave it.
  • The select-all boxes click as checkboxes do.

Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works

Accessibility

  • Each side is a listbox that takes several picks, named by its heading, with one tab stop and the focused item followed by aria-activedescendant.
  • A selected item shows a tick as well as its shade, and the count reads 2 of 6 selected to screen readers.
  • The move buttons are named for where they send items, such as Move selected to Granted, and turn off when there is nothing to move.
  • Moved items stay selected in their new list, so a wrong move is one click back.
  • A disabled item is shown at half strength, cannot be picked and is left out of Move all.
  • Below 512 pixels wide the lists stack, and the arrows point down and up.
KeysAction
TabMove through each list's select-all box, search field and list, and the move buttons.
↓ / ↑ / Home / EndIn a list: move and select that item alone.
Shift + ↓ / ↑Extend the selection from the last picked item.
Ctrl + ↓ / ↑, then SpaceMove without selecting, then add or remove the focused item.
Ctrl + ASelect every item in the list.
EnterMove the focused item to the other list. A double-click does the same.
Alt + ↑ / ↓In the target list, when it can be reordered: move the selected items up or down.

Source

SourcePro

The source comes with Pro

TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies

Files and dependencies

Adds
components/ui/transfer-list.tsx
Packages
None
Brings along
ButtonCheckboxSearch fieldSound engine
Icons
checkchevron-downchevron-rightchevron-upchevrons-right

Changelog

  1. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor