Skip to content

Transfer

Move items from one list to another. Commonly used in scenarios like permission assignment, role binding, etc.

Basic Usage

List 15 items
  • Illinois
  • Maryland
  • Florida
  • Colorado
  • Connecticut
List 22 items
  • California
  • Texas
Basic Usage

Searchable

List 17 items
  • California
  • Illinois
  • Maryland
  • Texas
  • Florida
  • Colorado
  • Connecticut
List 20 items
No data
Searchable

Custom Labels and Footers

Source3 items
  • Option 1
  • Option 2
  • Option 3
Target0 items
No data
Custom Labels

Field Mapping Alias

List 13 items
  • R&D Dept
  • HR Dept
  • Finance Dept
List 21 items
  • Marketing Dept
Field Mapping

Customizing Content

List 17 items
  • 1 - California
  • 2 - Illinois
  • 3 - Maryland
  • 4 - Texas
  • 5 - Florida
  • 6 - Colorado
  • 7 - Connecticut
List 20 items
No data
List 17 items
  • California
  • Illinois
  • Maryland
  • Texas
  • Florida
  • Colorado
  • Connecticut
List 20 items
No data
Content Customization

Virtual Scrolling

List 12000 items
  • Option 0
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
List 20 items
No data
Virtual Scrolling

Customizing Action Buttons

List 13 items
  • Item A
  • Item B
  • Item C
List 20 items
No data
Custom Buttons

Usage in Nuxt

The Transfer component fully supports Nuxt 3/4 environments. During Server-Side Rendering (SSR), both panels are pre-rendered with basic HTML to ensure visibility upon first load without hydration flickering.

List 12 items
  • Nuxt 2
  • Nuxt 4
List 21 items
  • Nuxt 3
Nuxt Usage

SSR Considerations:

  • ✅ Initial checked states (modelValue) render correctly into the right panel on the server.
  • ✅ Item labels and disabled statuses support SSR.
  • ✅ Virtual scrolling displays initial nodes on the first load.
  • ⚠️ Button interactions, listing searches, and selection toggles activate after client-side hydration.
  • 💡 Tooltips or dropdowns are handled via Teleport and don't affect the main HTML structure.

Performance

For huge datasets, the Transfer component uses optimized templates. Even without virtual enabled, the generated HTML structure is kept lean for optimal SSR performance.

API

Props

NameDescriptionTypeDefault
model-value / v-modelBinding valueTransferKey[][]
dataData sourceTransferData[][]
filterableWhether list is searchablebooleanfalse
filter-placeholderSearch input placeholderstring'Please enter keyword'
filter-methodCustom search method(query, item) => boolean
target-orderOrder strategy for the right panel'original' | 'push' | 'unshift''original'
titlesPanel titles[string, string]['List 1', 'List 2']
button-textsButton labels[string, string][]
render-contentCustom render function for content(h, option) => VNode
propsAlias config for data source fieldsTransferPropsAlias
left-default-checkedDefault items checked on the leftTransferKey[][]
right-default-checkedDefault items checked on the rightTransferKey[][]
virtualEnable virtual scrollingbooleanfalse
heightList height (px)number280
item-heightRow height (for virtual scrolling)number40
empty-textText for empty statesstring'No Data'
show-all-checkboxWhether to show the "select all" checkboxbooleantrue
left-titleTitle for the left panelstring
right-titleTitle for the right panelstring
disabledWhether disabledbooleanfalse

Events

NameDescriptionParameters
changeTriggers when the right list changes(value, direction, movedKeys)
left-check-changeTriggers when left selection changes(value, movedKeys)
right-check-changeTriggers when right selection changes(value, movedKeys)

Slots

NameDescriptionParameters
defaultCustom content for data items{ option }
left-headerLeft header content
right-headerRight header content
left-footerLeft footer content
right-footerRight footer content
left-emptyLeft empty state content
right-emptyRight empty state content
buttonsCustom action buttons area{ moveToLeft, moveToRight, leftChecked, rightChecked }

Expose

NameDescriptionType
clearLeftCheckedClears left selections() => void
clearRightCheckedClears right selections() => void
leftPanelLeft panel instanceTransferPanelExpose
rightPanelRight panel instanceTransferPanelExpose

Theme Variables

Variable NameDefaultDescription
--yh-transfer-panel-width200pxPanel width
--yh-transfer-panel-height300pxPanel height
--yh-transfer-header-height40pxHeader height
--yh-transfer-header-bg#f5f7faHeader background
--yh-transfer-item-height32pxRow height
--yh-transfer-border-color#ebeef5Border color

Released under the MIT License.