Examples
Move records in batches
Select multiple available values and move them in one action.
Available
3Selected
1Workspace permission transfer
"use client";
import { useState } from "react";
import { Transfer } from "@phuctech/ui/components/transfer";
const items = [{ key: "analytics", label: "Analytics" }, { key: "billing", label: "Billing" }, { key: "members", label: "Members" }, { key: "settings", label: "Settings" }];
export function Example() {
const [value, setValue] = useState<readonly string[]>(["members"]);
return <Transfer label="Workspace permissions" items={items} value={value} onValueChange={setValue} />;
}
Search each side
Each panel filters its visible list independently; select-all applies to visible enabled rows.
Available
3Selected
1Transfer with independent search
import { Transfer } from "@phuctech/ui/components/transfer";
const items = [{ key: "analytics", label: "Analytics" }, { key: "billing", label: "Billing" }, { key: "members", label: "Members" }, { key: "settings", label: "Settings" }];
export function Example() {
return <Transfer label="Dashboard modules" items={items} defaultValue={["analytics"]} />;
}
Disabled item
Unavailable values remain visible but cannot be selected or moved.
Available
2Selected
1Transfer with a disabled item
import { Transfer } from "@phuctech/ui/components/transfer";
const items = [{ key: "read", label: "Read access" }, { key: "edit", label: "Edit access", disabled: true }, { key: "admin", label: "Admin access" }];
export function Example() {
return <Transfer label="Role access" items={items} defaultValue={["edit"]} />;
}
Try the transfer
Inspect the two bounded lists and batch controls.
Available modules
2Enabled modules
1Transfer property playground
import { Transfer } from "@phuctech/ui/components/transfer";
const items = [{ key: "search", label: "Search" }, { key: "reports", label: "Reports" }, { key: "exports", label: "Exports" }];
export function Example() {
return <Transfer label="Enabled modules" items={items} defaultValue={["reports"]} sourceTitle="Available modules" targetTitle="Enabled modules" />;
}
Usage
import { Transfer } from "@phuctech/ui/components/transfer";
<Transfer label="Workspace permissions" items={items} value={member.accessIds} onValueChange={setAccessIds} />Behavior
Available and selected lists derive from the complete items collection and the controlled destination value. Search is local and separate for each list. Selection is interaction state; moving uses one batch callback. Select-all changes only visible enabled items and preserves hidden selections.
API
Accessibility
The root has a name, each list is a named section, search fields and checkboxes identify their target, and move buttons state the destination. Selection is exposed through shared Checkbox semantics. Long lists scroll inside their panels while titles and search controls remain fixed.