Zephora UI

Data

Transfer

Dual-list mover (pick list): select items in either panel and shuttle them across with the center controls.

Import

import { Transfer } from "@zephora/react";

Examples

Basic

Items whose key is in `targetKeys` appear on the target side.

Source
  • Write articles
  • Publish articles
  • Moderate comments
  • Manage billing
  • Manage users
Target
  • Read articles

Controlled and searchable

`searchable` adds a filter input to each panel.

Available
  • Write articles
  • Publish articles
  • Manage billing
  • Manage users
Granted
  • Read articles
  • Moderate comments
Granted: read, comment

API

Transfer props

PropTypeDefaultDescription
items *TransferItem[]Full item pool. Items whose key is in `targetKeys` show on the target side.
targetKeysstring[]Controlled target-side keys.
defaultTargetKeysstring[][]Uncontrolled initial target-side keys.
onChange(targetKeys: string[]) => voidFires with the new target-side keys after every move.
titles[ReactNode, ReactNode]["Source", "Target"]Panel headings.
searchablebooleanfalseAdds a filter input to each panel.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

TransferItem props

PropTypeDefaultDescription
key *stringUnique item key.
label *stringVisible item label (also used for search).
disabledbooleanItem cannot be selected and is skipped by "move all".