nf-transfer-select
Searchable two-panel multi-select, popup/inline layouts, filtered select-all, disabled rows, missing-value echo, aliases, selection limits, copying, creation, virtualization and slots.
Examples
Empty state / custom input
Expanded tags / no clear button / custom rendering
Disabled / disabled options
Extended slots
Default selection / custom items / custom rendering
Missing selected options / left action slot
Link options to prerequisites and update prompts
Props
Descriptions preserve common-ui semantics; defaults and signatures follow the current Vue 3 implementation. Compatibility props do not enable unsupported legacy rendering.
| Attribute | Description | Type | Values | Default |
|---|---|---|---|---|
modelValue / v-model (value) | Bound value; value remains compatible; prefer v-model in Vue 3 | OptionValue[] | — | [] |
options | List of selectable options | SelectOption[] | — | [] |
valueKey | Field used as the unique option value | string | — | 'value' |
labelKey | Field used as the option label | string | — | 'label' |
tag | Rendering mode; div displays inline panels; other values use Popover | string | Component | — | 'el-select' |
disabled | Disable interaction | boolean | — | false |
size | Input size; mini / medium map to small / default | SelectSize | small / default / large / mini / medium | Inherited configuration |
clearable | Show the clear selection control | boolean | — | true |
collapseTags | Collapse selected tags in multiple mode | boolean | — | true |
multipleLimit | Maximum selected items; 0 means unlimited | number | — | 0 |
allowCreate | Allow new options; requires filterable | boolean | — | false |
popperClass | Dropdown CSS class | string | — | undefined |
reserveKeyword | Keep the search keyword after selection | boolean | — | false |
popperAppendToBody | Teleport dropdown to body; maps to Element Plus teleported | boolean | — | false |
automaticDropdown | Open non-filterable select on focus | boolean | — | false |
filterable | Enable searching | boolean | — | true |
filterMethod | Custom filtering function | (query: string, option: Option) => boolean | — | undefined |
leftFormat | Left panel selection count format | TransferFormat | — | { noChecked: '(${total})', hasChecked: '(${checked}/${total})' } |
rightFormat | Right panel selection count format | TransferFormat | — | { noChecked: '(${total})', hasChecked: '(${checked}/${total})' } |
leftRenderContent | Custom left item renderer (h, option) | (h, option) => VNodeChild | — | undefined |
rightRenderContent | Custom right item renderer (h, option) | (h, option) => VNodeChild | — | undefined |
targetOrder | Right order: original follows source; push appends; unshift prepends | string | original / push / unshift | 'original' |
placeholder | Input placeholder | string | — | Locale configuration |
leftFilterPlaceholder | Left panel search placeholder | string | — | Locale configuration |
rightFilterPlaceholder | Right panel search placeholder | string | — | Locale configuration |
titles | Left and right panel titles | string[] | — | Locale configuration |
isCheckValid | Check and mark missing selected options | boolean | — | true |
preTip | Transfer panel hint | string | — | '' |
copyValType | Copy mode: 1 labels, 2 values; unset disables copying | number | string | 1 / 2 | undefined |
copySucessDesc | Copy success message | string | — | Locale configuration |
virtualList | Enable virtual scrolling | boolean | — | false |
queryRequired | Show list only after entering a query | boolean | — | false |
name | Native input name | string | — | undefined |
Events
| Event | Description | Arguments |
|---|---|---|
update:modelValue | Selection changed; update v-model | (value: OptionValue[]) |
update:value | Selection changed; compatibility event | (value: OptionValue[]) |
input | Selection changed; compatibility event | (value: OptionValue[]) |
change | Fires when selection changes | (value: OptionValue[]) |
focus | Input gains focus | (event: FocusEvent) |
blur | Input loses focus | (event: FocusEvent) |
clear | Clear control activated | () |
remove-tag | Tag removed in multiple mode | (value: SelectValue) |
visible-change | Dropdown shown: true; hidden: false | (visible: boolean) |
left-check-change | Left check changed; returns the final selected values | (values: OptionValue[]) |
right-check-change | Right check changed; returns affected valid values | (values: OptionValue[]) |
left-item-click | Left item button clicked; returns full option | (option: Option) |
copySuccess | Copy succeeded; returns copied text | (text: string) |
copyError | Copy failed; returns error | (error: unknown) |
Slots
| Slot | Description | Scope |
|---|---|---|
left-item | Custom left item content | { option: Option } |
right-item | Custom right item content | { option: Option } |
left-footer | Left panel footer | — |
right-footer | Right panel footer | — |
prefix | Input prefix | — |
empty | Empty option list content | — |
left-item-button | Left item action button; fires left-item-click | — |
Exposed methods and state
cachedValueoptionsDatanfLeftTransferSelectnfRightTransferSelectnfTransferSelectFormContainerclearAll()removeTag(value)visibleChange(boolean)
Migration notes
Vue 3 uses modelValue / update:modelValue; legacy value, update:value and input remain available on selection components. The implementation uses public Element Plus APIs, not Element UI internals. mini maps to small; medium maps to default.
tag="div" renders inline panels. Disabled options survive bulk removal. copyValType=1 copies labels; 2 copies keys. Scoped slots receive { option }; render callbacks use Vue 3 h.
