Skip to content
SortableExamples

Vue — Transfer between two lists

comins-sortable@0.1.6Vue

Reorder items within one list or transfer them to another. Both areas share one scope and group="tasks", with unique areaId values. Item IDs remain stable during transfer.

Drag the left handle into the empty list on the right. The done count increases and the item leaves the first list. Reset returns all items to their original order. Transfer in this example uses pointer interaction.

Import SortableRoot and SortableArea from comins-sortable/vue. v-model connects modelValue with update:modelValue. Render items through the #item slot receiving { item, index }. React items/onItemsChange props do not apply to this adapter.

Handles use touch-action: none and user-select: none to avoid competing touch scroll and text selection during a drag.

Uses Vue SFC generic inference in 0.1.6. SortableArea infers item and slot types from modelValue without a component type assertion.

Transfer, move between lists, drag and drop, reorder, shared scope.

npm 0.1.6 · Vue guide