Vue Transfer Component API

Transfer API

Explore the API reference for the Vue Transfer component and discover how to effectively utilize its props for customization.

On this page

CTransfer

jsx
import { CTransfer } from '@coreui/vue-pro'

Props

PropertyDefaultType
ariaMoveAllToSourceLabel'Move all to available'string

Accessible name of the button that moves every visible, enabled option back to the source list.

ariaMoveAllToTargetLabel'Move all to chosen'string

Accessible name of the button that moves every visible, enabled option to the target list.

ariaMovedAnnouncement'{count} moved to {title}'string

What is announced after a move. {count} is how many options moved, {title} the destination's title, and both are replaced wherever they appear.

ariaMoveToSourceLabel'Move to available'string

Accessible name of the button that moves the selection back to the source list.

ariaMoveToTargetLabel'Move to chosen'string

Accessible name of the button that moves the selection to the target list.

defaultValue-string[]

The values that start in the target list, when the value is not controlled through value.

disabled-boolean

Turns the whole transfer off: both list boxes, both search fields and every move button.

indicator'checkbox'ListBoxIndicator

Passed to both list boxes. 'none' drops the checkbox in front of every option.

items() => []TransferItem[]

The options the transfer moves around. Each entry is passed to the item slot, which renders the contents of its option.

loadingfalseboolean, { source?: boolean; target?: boolean }

Covers the wait of one list or of both: a loading list is marked aria-busy and shows a row with a spinner and loadingLabel below its options, which stay usable. Pass a boolean for both lists, or { source, target } for one of them.

loadingLabel6.0.0+'Loading…'string

Text of the loading row below the options, announced to screen readers when the shown list starts loading or the list shows up loading.

oneWay-boolean

Takes the return trip away: both buttons that move back are hidden and a value that has been chosen stays chosen.

Passed to both list boxes: puts a search field above each list, hiding the options that do not match — so the arrows skip them, the counter drops them and the select-all button takes only what is left on screen. With 'external' nothing is hidden here: every keystroke is reported through the search event and the answer arrives as new items.

searchPlaceholder'Search'string

Passed to both list boxes: the placeholder of their search fields, and the first half of their accessible name.

selectedLabel() => defaultSelectedLabelCountLabel

Passed to both list boxes as their header count text. A function (count, total) => string, or a string in which {count} and {total} are replaced.

sourceTitle'Available'string

Title of the source list: the label of its select-all button and its accessible name.

targetTitle'Chosen'string

Title of the target list.

typeaheadtrueboolean

Passed to both list boxes: move the highlight to the option matching what the user types.

valueundefinedstring[]

The values in the target list. When set, the component renders that value and only reports the moves through the change event. Supports the v-model:value binding.

Events

Event name
change

Callback fired after options moved between the lists.

  • value array
  • change object — { direction, moved } — which list was filled and the values that moved into it.

Callback fired when a search field changes. In the 'external' search mode it is the only report the component makes — nothing is filtered here.

  • side string — 'source' or 'target' — the list the query was typed in.
  • query string
update:value

Emit the values of the target list to support the v-model:value binding.