Skip to content

Options

Shared by every binding — flat props in React/Vue, the action/primitive options object in Svelte/Solid, attributes + options on <dnd-list>, and the createSortable/DndList options in vanilla.

Behaviour

OptionTypeDefaultDescription
groupstring | DragGroupObjectCross-list group; see Groups & Cloning. Ungrouped lists are isolated.
sortbooleantrueAllow reordering within this list.
disabledbooleanfalseDisable all interactions.
draggablestringCSS selector items must match to be draggable.
handlestringDrag only starts on elements matching this selector inside an item.
filterstringDrag is blocked when the pointerdown target matches.
preventOnFilterbooleantruepreventDefault() on filtered pointerdowns.
delaynumber0ms before a drag arms (long-press).
delayOnTouchOnlybooleantrueApply delay only for touch pointers.
touchStartThresholdnumber5Pointer drift allowed during delay (px).
dragThresholdnumber5Travel needed to start an un-delayed drag (px).
dragMaxItemsnumber0Multi-drag batch cap (0 = unlimited).
multiDragbooleanfalseCtrl/Cmd/Shift-click selection + batch dragging.
keyboardbooleanfalseKeyboard reordering + ARIA.
ariaLabelstringList name used in keyboard announcements.

Hit-testing & layout

OptionTypeDefaultDescription
axis'x' | 'y' | nullnullLock the ghost to one axis.
direction'horizontal' | 'vertical' | 'auto''auto'Force hit-test direction.
swapbooleanfalseExchange with the hovered item instead of inserting.
swapThresholdnumber (0..1)1Overlap needed to trigger a reorder/swap.
invertSwapbooleanfalseReverse the swap zone.
emptyInsertThresholdnumber5Slack (px) around an empty list before it accepts drops.
rtlbooleanautoForce right-to-left logic (else detected from CSS direction).

Animation & ghost

OptionTypeDefaultDescription
animationnumber200FLIP duration (ms); 0 disables.
easingstringcubic-bezier(0.2, 0, 0, 1)Easing for FLIP and revert animations.
ghostFactory(info) => HTMLElementBuild a custom drag preview.
ghostClassstringExtra class on the source item while dragging.
chosenClassstringClass on the item from pointerdown to release.
dragClassstringExtra class on the floating ghost.
selectedClassstring'dnd-selected'Class on multi-drag selected items.

Transfers & spill

OptionTypeDefaultDescription
clone(item) => itemstructuredCloneCopy transform for pull: 'clone' (vanilla: cloneNode(true)).
revertOnSpillbooleanfalseRestore order when dropped outside every list.
removeOnSpillbooleanfalseRemove items dropped outside every list.
revertClonebooleanfalseAnimate a clone home when dropped on its own source.

Autoscroll

OptionTypeDefaultDescription
scrollSensitivitynumber48Edge distance (px) where scrolling engages.
scrollSpeednumber18Max scroll velocity (px/frame).
scrollDisabledbooleanfalseTurn autoscroll off.

Binding-specific

WhereOptionDescription
React/Vue componentsitemKey, tag, itemTagKeying and rendered tags.
ReactclassName, itemClassName, header, footer, renderItemRendering.
Vue#item/#header/#footer slots, transitionNameRendering & transitions.
Vanilla / elementitemSelectorWhich direct children count as items (default: all).

Event callbacks (onStart, onEnd, …) are part of the same options object — see Events.

Released under the MIT License.