# Transfer list

Assign records between two labelled sets with explicit selection and move actions.

Access: pro. Category: Forms. Kind: composite.

## When to use

- Use it when a page needs assign records between two labelled sets with explicit selection and move actions.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.

## Alternatives

- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than transfer list.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Transfer list

```sh
npx shadcn@latest add @tidal-pro/transfer-list
```

Stylesheets: `components/ui/tidal.css`, `components/ui/transfer-list.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/transfer-list.css";
import{TidalTransferList}from"./components/ui/transfer-list";
export default(p:Parameters<typeof TidalTransferList>[0])=><div className="tidal-scope"><TidalTransferList {...p}/></div>;
```

## Structured props

- `TidalTransferList.destinationItems: ReadonlyArray<TidalTransferItem>`: Required destination items value accepted by this exported component.
- `TidalTransferList.destinationLabel: string`: Required destination label value accepted by this exported component.
- `TidalTransferList.destinationSelectedIds: ReadonlyArray<string>`: Required destination selected ids value accepted by this exported component.
- `TidalTransferList.label: string`: Required label value accepted by this exported component.
- `TidalTransferList.onDestinationSelectionChange: (selectedIds: readonly string[], item: TidalTransferItem, checked: boolean) => void`: Callback invoked when the destination selection change interaction is proposed.
- `TidalTransferList.onMoveToDestination: (itemIds: readonly string[], event: ReactMouseEvent<HTMLButtonElement>) => void`: Callback invoked when the move to destination interaction is proposed.
- `TidalTransferList.onMoveToSource: (itemIds: readonly string[], event: ReactMouseEvent<HTMLButtonElement>) => void`: Callback invoked when the move to source interaction is proposed.
- `TidalTransferList.onSourceSelectionChange: (selectedIds: readonly string[], item: TidalTransferItem, checked: boolean) => void`: Callback invoked when the source selection change interaction is proposed.
- `TidalTransferList.sourceItems: ReadonlyArray<TidalTransferItem>`: Required source items value accepted by this exported component.
- `TidalTransferList.sourceLabel: string`: Required source label value accepted by this exported component.
- `TidalTransferList.sourceSelectedIds: ReadonlyArray<string>`: Required source selected ids value accepted by this exported component.
- `TidalTransferList.destinationPanelProps?: TransferPanelProps | undefined`: Optional destination panel props value accepted by this exported component.
- `TidalTransferList.destinationPanelRef?: Ref<HTMLDivElement> | undefined`: Optional destination panel ref value accepted by this exported component.
- `TidalTransferList.disabled?: boolean | undefined` (default false): Optional disabled value accepted by this exported component.
- `TidalTransferList.headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6" | undefined` (default "h3"): Optional heading level value accepted by this exported component.
- `TidalTransferList.labels?: Partial<TidalTransferListLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalTransferList.moveAllToDestinationProps?: TransferActionProps | undefined`: Optional move all to destination props value accepted by this exported component.
- `TidalTransferList.moveAllToDestinationRef?: Ref<HTMLButtonElement> | undefined`: Optional move all to destination ref value accepted by this exported component.
- `TidalTransferList.moveAllToSourceProps?: TransferActionProps | undefined`: Optional move all to source props value accepted by this exported component.
- `TidalTransferList.moveAllToSourceRef?: Ref<HTMLButtonElement> | undefined`: Optional move all to source ref value accepted by this exported component.
- `TidalTransferList.moveSelectedToDestinationProps?: TransferActionProps | undefined`: Optional move selected to destination props value accepted by this exported component.
- `TidalTransferList.moveSelectedToDestinationRef?: Ref<HTMLButtonElement> | undefined`: Optional move selected to destination ref value accepted by this exported component.
- `TidalTransferList.moveSelectedToSourceProps?: TransferActionProps | undefined`: Optional move selected to source props value accepted by this exported component.
- `TidalTransferList.moveSelectedToSourceRef?: Ref<HTMLButtonElement> | undefined`: Optional move selected to source ref value accepted by this exported component.
- `TidalTransferList.sourcePanelProps?: TransferPanelProps | undefined`: Optional source panel props value accepted by this exported component.
- `TidalTransferList.sourcePanelRef?: Ref<HTMLDivElement> | undefined`: Optional source panel ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/transfer-list.tsx) | [Manifest](https://tidalui.com/examples/transfer-list.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
import "./components/ui/tidal.css";

import { useState } from "react";

import { TidalTransferList, type TidalTransferItem } from "./components/ui/transfer-list";

import "./components/ui/transfer-list.css";

import "./components/ui/checkbox.css";



const tidalExampleStyles = ".tidal-scope .transfer-list-demo {\n  display: grid;\n  width: 100%;\n  max-width: 900px;\n  min-width: 0;\n  gap: 14px;\n}\n\n.tidal-scope .transfer-list-demo-status {\n  min-width: 0;\n  min-height: 22px;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}";

const INITIAL_AVAILABLE: readonly TidalTransferItem[] = [
  {
    id: "kickoff-notes",
    label: "Kickoff notes",
    description: "Decisions and open questions from the first review.",
  },
  {
    id: "research-summary",
    label: "Research summary",
    description: "Interview themes and supporting observations.",
  },
  {
    id: "brand-checklist",
    label: "Brand checklist",
    description: "Approved names, marks and editorial rules.",
  },
  {
    id: "budget-approval",
    label: "Budget approval",
    description: "Locked while finance completes its review.",
    disabled: true,
  },
];

const INITIAL_PACKET: readonly TidalTransferItem[] = [
  {
    id: "launch-brief",
    label: "Launch brief",
    description: "Audience, rollout sequence and owner notes.",
  },
  {
    id: "accessibility-audit",
    label: "Accessibility audit",
    description: "Keyboard and screen-reader findings.",
  },
];

export function TransferListDemo() {
  const [available, setAvailable] = useState<TidalTransferItem[]>([
    ...INITIAL_AVAILABLE,
  ]);
  const [packet, setPacket] = useState<TidalTransferItem[]>([
    ...INITIAL_PACKET,
  ]);
  const [availableSelected, setAvailableSelected] = useState<string[]>([
    "research-summary",
  ]);
  const [packetSelected, setPacketSelected] = useState<string[]>([]);
  const [status, setStatus] = useState(
    "Sample records change only in this preview.",
  );

  function move(
    ids: readonly string[],
    direction: "to-packet" | "to-available",
  ) {
    const source = direction === "to-packet" ? available : packet;
    const moved = source.filter((item) => ids.includes(item.id));
    if (!moved.length) return;

    if (direction === "to-packet") {
      setAvailable(source.filter((item) => !ids.includes(item.id)));
      setPacket((current) => [...current, ...moved]);
      setAvailableSelected([]);
    } else {
      setPacket(source.filter((item) => !ids.includes(item.id)));
      setAvailable((current) => [...current, ...moved]);
      setPacketSelected([]);
    }

    setStatus(
      `${moved.length} ${moved.length === 1 ? "record" : "records"} moved ${
        direction === "to-packet" ? "into the release packet" : "to available"
      }. Local sample only.`,
    );
  }

  return (
    <div className="transfer-list-demo">
      <TidalTransferList
        label="Release packet documents"
        sourceLabel="Available"
        destinationLabel="Release packet"
        sourceItems={available}
        destinationItems={packet}
        sourceSelectedIds={availableSelected}
        destinationSelectedIds={packetSelected}
        onSourceSelectionChange={(ids) => setAvailableSelected([...ids])}
        onDestinationSelectionChange={(ids) => setPacketSelected([...ids])}
        onMoveToDestination={(ids) => move(ids, "to-packet")}
        onMoveToSource={(ids) => move(ids, "to-available")}
        labels={{
          moveSelectedToDestination: "Add selected",
          moveAllToDestination: "Add all",
          moveSelectedToSource: "Remove selected",
          moveAllToSource: "Remove all",
          actions: "Release packet actions",
        }}
      />
      <output className="transfer-list-demo-status" aria-live="polite">
        {status}
      </output>
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <TransferListDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

Controlled source and destination arrays require stable string IDs that are unique across both sets, string labels and optional descriptions, disabled state, native list-item props, native Checkbox props and Checkbox refs. Controlled selected-ID arrays and required selection callbacks keep selection consumer-owned. Two required move callbacks receive enabled record IDs and the native click event; consumers accept or decline each proposal and own all data changes, validation, persistence and side effects. Move-selected and move-all actions are persistent native type=button controls with separate native props and refs, caller-first click prevention, and normalized disabled and aria-disabled behavior. Accepted moves focus the first transferred Checkbox when it is visible; a persistent enabled action receives focus when a stacked phone target is off screen. Disabled records remain visible and never move. Root label, native section props/ref, headingLevel h2 through h6, panel props/refs, localized labels/count formatter, global disabled state, empty sets, long text, RTL and stacked narrow layout are supported. The component performs no hidden mutation, drag behavior, network request or storage.
