---
title: "Transfer List"
description: "Move items from one list to another, such as people onto a project. Each side has search and a select-all box, with a seat limit, drag, and Undo."
url: https://gelatinui.com/components/transfer-list
markdown_url: https://gelatinui.com/components/transfer-list.md
access: free
install: "npx shadcn@latest add @gelatin-ui/transfer-list"
registry_item: https://gelatinui.com/r/transfer-list.json
version: "2026-11-17"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Transfer List

> Move items from one list to another, such as people onto a project. Each side has search and a select-all box, with a seat limit, drag, and Undo.

Page: https://gelatinui.com/components/transfer-list

## When to use it

Best for: Move many items from a free list to a chosen list, and set the order of the chosen ones.

- Use it when people pick many items from a long list and need to see both lists at once.
- Use `max` to stop the chosen list at a seat limit, and `TransferListLimit` to say when it is full.
- Use `locked` for items that must stay chosen, such as the owner, and `disabledKeys` for items that cannot move now.
- Use the chosen side's order: drag a row, or press Alt with an arrow key, to move it.

## When not to use it

- To pick a few values in a field, use a [Combobox](https://gelatinui.com/components/combobox.md).
- To pick values from a tree, use a [Tree Select](https://gelatinui.com/components/tree-select.md).
- To put one list in order, use a [Sortable List](https://gelatinui.com/components/sortable-list.md).

## Notes for agents

- `items` holds every item of both sides: `{ value, text }`. `text` is what the search and the sort read.
- `value` is the chosen side, as keys in their order. The free side is every other item, sorted by `text`.
- Compose two `TransferListPanel` parts, `side="source"` and `side="target"`, with `TransferListActions` between them.
- `TransferListList` takes a function child: it gets a key and returns a `TransferListItem` with the row content.
- Each move shows a Toast with Undo: render a `Toaster` inside a `ToastProvider` on the page.
- Each list draws only the rows in view, so thousands of rows stay fast.
- Under 640px the lists stack, and the move buttons sit in a row between them.

## Anatomy

```text
TransferList
├─ TransferListPanel (0..n)
│  ├─ TransferListSearch (0..n)
│  └─ TransferListEmpty (0..n)
├─ TransferListHeader (0..n)
├─ TransferListSelectAll (0..n)
├─ TransferListTitle (0..n)
├─ TransferListCount (0..n)
├─ TransferListSelection (0..n)
├─ TransferListList (0..n)
├─ TransferListItem (0..n)
├─ TransferListItemText (0..n)
├─ TransferListItemTitle (0..n)
├─ TransferListItemDescription (0..n)
├─ TransferListActions (0..n)
└─ TransferListLimit (0..n)
```

## API reference

### TransferList

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `readonly Readonly` |  | Every item, on both sides: its key and the text it is searched and sorted by. |
| `value` | `readonly string[]` |  | The chosen side: item keys in their order. |
| `defaultValue` | `readonly string[]` |  |  |
| `onValueChange` | `function` |  |  |
| `locked` | `readonly string[]` |  | Keys that stay on the chosen side: no box, no drag (the owner of a project). |
| `disabledKeys` | `readonly string[]` |  | Keys that cannot move now: their rows dim and take no press. |
| `max` | `number` |  | The most items the chosen side holds (seats). A move stops at the room left. |
| `locale` | `string` |  | The search and sort language. Default: the `DisplayLocaleProvider` locale, else `en-US`. |
| `labels` | `Partial<typeof TRANSFER_LIST_LABELS>` |  |  |
| `children` | `ReactNode` |  |  |

### TransferListPanel

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `side` | `"source" \| "target"` |  | `source`: the free items. `target`: the chosen ones. |

### TransferListHeader

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListSelectAll

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `size` | `"default" \| "lg"` |  | `default` 16px, or `lg` 20px. Default: the `CheckboxGroup` size, else `default`. |

Also takes every prop of Base UI `Checkbox.Root`: https://base-ui.com/react/components/checkbox

### TransferListTitle

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListCount

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListSelection

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListSearch

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `onSearch` | `function` |  | Run the search: on Enter, on a clear (with ""), and after `debounce` ms of no typing. |
| `onClear` | `function` |  | The text was cleared (the clear button, or Escape with text). |
| `debounce` | `number` |  | Ms of no typing before `onSearch` runs. `undefined` (the default): typing does not search, only Enter and a clear do. `0`: each change searches. |
| `shortcut` | `false \| SearchFieldShortcut` |  | The key that focuses and selects the field from anywhere. Default `false` (none). |
| `className` | `string` |  | Classes of the frame (the InputGroup), for its width. |
| `busy` | `boolean` |  | The field waits for results: the spinner takes the place of the search icon, and the input is `aria-busy`. |
| `labels` | `Partial` |  | The words (`SEARCH_FIELD_LABELS`). Keep the object stable. |
| `rounded` | `"default" \| "full"` |  |  |
| `size` | `"default" \| "lg" \| "sm" \| "xs"` |  |  |
| `variant` | `"dashed" \| "default"` |  |  |

### TransferListList

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `function` |  | Renders the content of one row from its key: put a `TransferListItem` around it. |

### TransferListItem

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListItemText

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListItemTitle

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListItemDescription

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListEmpty

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListActions

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TransferListLimit

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TransferList | `transfer-list` |  |  |  |
| TransferListPanel | `transfer-list-panel` | `data-drop-refused`, `data-drop-target` |  |  |
| TransferListHeader | `transfer-list-header` |  |  |  |
| TransferListSelectAll | `transfer-list-select-all` |  |  |  |
| TransferListTitle | `transfer-list-title` |  |  |  |
| TransferListCount | `transfer-list-count` |  |  |  |
| TransferListSelection | `transfer-list-selection` |  |  |  |
| TransferListSearch | `transfer-list-search` |  |  |  |
| TransferListList | `transfer-list-list` | `data-active`, `data-empty` | `--virtual-total` |  |
| TransferListItem | `transfer-list-item` | `data-checked`, `data-disabled`, `data-locked` |  |  |
| TransferListItemText | `transfer-list-item-text` |  |  |  |
| TransferListItemTitle | `transfer-list-item-title` |  |  |  |
| TransferListItemDescription | `transfer-list-item-description` |  |  |  |
| TransferListEmpty | `transfer-list-empty` |  |  |  |
| TransferListActions | `transfer-list-actions` |  |  |  |
| TransferListLimit | `transfer-list-limit` |  |  | `status-colors` |

## Usage

Pass every item as `items` and the chosen keys as `defaultValue`. Each list renders its rows from a function that gets a key. Render a `Toaster` for the Undo Toast.

```tsx title="project-members.tsx"
import {
  TransferList,
  TransferListActions,
  TransferListCount,
  TransferListHeader,
  TransferListItem,
  TransferListList,
  TransferListPanel,
  TransferListSelectAll,
  TransferListTitle,
} from "@/components/pickers/transfer-list";

const PEOPLE = [
  { value: "maya", text: "Maya Chen" },
  { value: "tomas", text: "Tomáš Novák" },
  { value: "aisha", text: "Aisha Bello" },
  { value: "daniel", text: "Daniel Okafor" },
];
const NAMES = new Map(PEOPLE.map((person) => [person.value, person.text]));

export function ProjectMembers() {
  return (
    <TransferList items={PEOPLE} defaultValue={["maya"]} locked={["maya"]} max={3}>
      {(["source", "target"] as const).map((side) => (
        <TransferListPanel key={side} side={side} className={side === "target" ? "order-3" : ""}>
          <TransferListHeader>
            <TransferListSelectAll />
            <TransferListTitle>{side === "source" ? "Workspace" : "Project"}</TransferListTitle>
            <TransferListCount />
          </TransferListHeader>
          <TransferListList aria-label={side === "source" ? "Workspace" : "Project"}>
            {(key) => <TransferListItem>{NAMES.get(key)}</TransferListItem>}
          </TransferListList>
        </TransferListPanel>
      ))}
      <TransferListActions className="order-2" />
    </TransferList>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/transfer-list
```

It adds 50 registry items: 47 files, 7790 lines, and the npm packages `@base-ui/react`, `@dnd-kit/dom`, `@dnd-kit/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@tanstack/react-hotkeys`, `@tanstack/react-virtual`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Button](https://gelatinui.com/components/button.md)
- [Checkbox](https://gelatinui.com/components/checkbox.md)
- [Search Field](https://gelatinui.com/components/search-field.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Sortable List](https://gelatinui.com/components/sortable-list.md)
- [Checkbox](https://gelatinui.com/components/checkbox.md)
- [Search Field](https://gelatinui.com/components/search-field.md)
- [Toast](https://gelatinui.com/components/toast.md)
- [Tree Select](https://gelatinui.com/components/tree-select.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves to a list. Each list is one tab stop, and the active row has a ring. |
| Up Arrow, Down Arrow | Moves the active row. |
| Home, End | Goes to the first or the last row. |
| Space | Checks or clears the active row. With Shift, it checks the rows from the last check to here. |
| Enter | Moves the checked rows to the other list, or the active row when none is checked. |
| Cmd+A, Ctrl+A | Checks every row that the search keeps. Locked and disabled rows stay out. |
| / | Moves focus to the search of the list. |
| Alt+Up Arrow, Alt+Down Arrow | On the chosen side, moves the active row up or down in the order. |

## Accessibility

Each list is a listbox with one tab stop. The active row is an option that the list points at with `aria-activedescendant`.

A checked row has `aria-selected`. A locked or disabled row has `aria-disabled`, and a locked row shows a lock.

The four move buttons have names, such as Move the checked items to the chosen list, and each is off while it has nothing to move.

On a touch screen the Add and Remove button of each row always shows.

## Motion

| Part | Motion |
| --- | --- |
| Row button | hover · 150ms · the Add or Remove button fades in on hover and on the active row |
| Just moved | fade · 1200ms · the rows that moved show a green tint that fades out |
| Drag | panel · 260ms · ease-panel (0.2, 0.4, 0.2, 1) · the rows slide to open a slot where the drop lands |
