OptionalghostOptionalchosenCSS class applied to the chosen element when drag starts
OptionaldragCSS class applied to the dragging element
OptionalanimationAnimation duration in milliseconds. Set to 0 to disable animations.
OptionaleasingCSS easing function for animations
OptionalgroupGroup name or configuration for sharing items between lists
OptionalsortWhether sorting is enabled within the list
OptionalcontrolledControlled (framework-friendly) mode
When true, the library NEVER changes the structural position of
consumer-owned nodes. During a drag it only manages its own overlay
ghost, a single placeholder element, and hide/show styling on the
dragged items. When end (and add/remove/update) fire, the DOM
structure is identical to pre-drag; the events carry the full intent
(including SortableEvent.oldIndexes / SortableEvent.newIndexes)
and the consumer commits it by updating state and re-rendering.
Designed for declarative frameworks (React, Vue, Svelte) that own the
list DOM. See docs/plans/2026-07-09-controlled-mode-design.md.
Note: sort() and store are no-ops in controlled mode — order is
consumer state.
OptionaldisabledWhether the sortable is disabled
OptionalmultiEnable multi-drag functionality
OptionalmultiModifier key required for click-to-select in multi-drag mode.
When set, selection becomes an explicit gesture: <key>+click toggles
an item in/out of the selection and Shift+click extends a range, while
a PLAIN click does nothing — no selection, no focus steal — leaving
plain-click semantics (activating / triggering the item) to the app.
When null (default), plain clicks toggle selection additively —
appropriate for lists where clicking has no other meaning.
Keyboard selection (Space) and dragging an existing selection are
unaffected. Legacy parity: SortableJS MultiDrag's multiDragKey.
OptionalduplicateModifier key that, when held at drop time, duplicates the dragged item(s) instead of moving them.
Off by default. Pointer drags only — keyboard-driven accessibility
drags ignore it. The modifier is evaluated live: it's the state at drop
time that decides, not the state at drag start. A cross-zone drop
behaves like group.pull: 'clone'; a same-zone drop inserts a copy at
the drop position while the original returns to its start index (see
the clone event, where to === from marks this in-place case). The
clone keeps the original's data attributes (e.g. data-id) — mint new
ids in the clone event handler.
A same-list duplicate also fires sort, update and change with
pullMode: 'clone' and clone set — handlers must insert a copy, not
move the item. See the SortableEvents.update docs.
With sort: false reordering is blocked, so the copy simply lands
adjacent to the original. That is intended, not a bug.
'alt' is the recommended value. With multiDrag: true, only 'alt'
may be held at drag START, since ctrl/meta/shift are selection
gestures there; all four still arm duplicate mode if pressed after the
drag begins. And with enableAccessibility (on by default) click
selection is live, so ctrl/meta/shift do double duty: the click
that ends a duplicate drag also reaches the selection handler and
toggles the item's selected state. Nothing suppresses that — pick
'alt' unless you want both effects.
The sortable-duplicate CSS class is applied to the ghost and
placeholder while duplicate mode is armed.
OptionalselectedCSS class for selected items in multi-drag mode
OptionalscrollAuto-scroll scrollable ancestors (and the window) when dragging near
their edges. Legacy parity: SortableJS Scroll plugin's scroll: true.
Internally installs an instance-owned AutoScrollPlugin.
OptionalscrollDistance in px from a scrollable edge at which auto-scroll kicks in.
Only meaningful with scroll: true.
OptionalscrollAuto-scroll speed in px per frame. Only meaningful with scroll: true.
OptionaldeselectClear selection when clicking outside the sortable container
OptionalonCallback fired when drag operation ends
The sortable event containing drag details
OptionalonCallback fired when drag operation starts
The sortable event
OptionalonCallback fired when an item is added from another list
The sortable event
OptionalonCallback fired when sorting changes within the same list
The sortable event
OptionalonCallback fired when an item is removed to another list
The sortable event
OptionalenableEnable accessibility features (keyboard navigation, ARIA attributes)
OptionalfocusCSS class for focused items during keyboard navigation
OptionalonCallback fired when items are selected/deselected
The sortable event
OptionalhandleCSS selector for drag handle When specified, drag can only be initiated from matching elements
OptionalfilterCSS selector for elements that should not trigger drag
OptionalonCallback fired when a filtered element is clicked
The original mouse/touch event
OptionalignoreCSS selector for descendants of draggable items that should NOT initiate a drag.
Used to allow click-through on interactive elements like links and images so
users can follow an <a> or drag an <img> natively without a sortable drag
starting underneath them. Matches the legacy Sortable.js v1 behaviour and
default value.
Pass an empty string ('') to disable the default and allow drags to start
from any descendant.
OptionaldraggableCSS selector for draggable items
OptionaldelayDelay in milliseconds before drag starts
OptionaldelayDelay on touch devices (fallback to delay if not specified)
OptionaltouchPixels of movement allowed before cancelling delayed drag event
OptionalswapThreshold of the swap zone (0-1)
When unset (the default), the overlap gate is disabled — swaps are not constrained by overlap amount. Setting this property enforces a minimum overlap for a swap to occur.
OptionalinvertInverts the swap threshold behavior
OptionalinvertedThreshold when swap is inverted (0-1)
OptionaldirectionDirection of sortable ('vertical' or 'horizontal')
OptionalforceEnable fallback for browsers without native drag support
OptionalfallbackCSS class for fallback ghost element
OptionalfallbackUse fallback on touch devices
OptionalfallbackPixels the pointer must travel from pointerdown before the pointer
pipeline commits the drag (ghost, placeholder, start event). 0
commits immediately on pointerdown. choose fires at pointerdown
either way. Recommended for apps where plain click has its own
meaning (e.g. triggering the item): a few px keeps clicks from
churning a full drag start/teardown.
OptionalfallbackX-axis offset for fallback ghost
OptionalfallbackY-axis offset for fallback ghost
OptionaldragoverAllow dragover event to bubble. When false (default), the library
calls e.stopPropagation() after handling so that ancestor sortables
don't double-process the event. Set true to support nested sortables.
OptionaldropAllow drop event to bubble. When false (default), the library calls
e.stopPropagation() after handling. Set true to let ancestor
sortables observe drop completions (e.g. for nested-sortable layouts).
OptionalremoveRemove clone element when it's not showing.
Currently a no-op: Resortable does not yet implement clone hide/show cycles — clones are always created on drag start and removed on drag end. Tracked in the v1.x parity work under #44.
OptionalemptyDistance mouse must move from empty sortable to insert drag element into it
OptionalhitCSS selector for a surrounding region that also accepts drops for this
zone. When a drop lands anywhere inside zoneEl.closest(hitArea) but
outside the zone's own rect — and over no other zone/item — it resolves
to this zone and inserts at the nearest end (index 0 when the pointer is
before the zone's start edge, else append). Generalizes
emptyInsertThreshold to a large, caller-defined region around a
populated list (#126). Fallback only: a pointer directly over a zone or
its items always wins, and group put/pull rules are still enforced.
OptionalpreventCall preventDefault when filter is triggered
OptionaldataHTML attribute used to track element IDs
OptionalonCallback fired when an element is chosen
The sortable event
OptionalonCallback fired when an element is unchosen
The sortable event
OptionalonCallback fired when sorting changes
The sortable event
OptionalonCallback fired during move operations
The move event with related element
The original drag event
false to cancel the move (no placeholder shift; no sort / update /
change emission for that tick)-1 to force inserting BEFORE the related item1 to force inserting AFTER the related itemtrue / void to proceed with the natural heuristicOptionalonCallback fired when an element is cloned
The sortable event with clone
OptionalonCallback fired when the sort order has changed
The sortable event
OptionalonCallback fired when an item is dropped outside all sortable containers
The sortable event
OptionalrevertRevert item to its original position when dropped outside sortable areas Requires the OnSpill plugin to be installed.
OptionalremoveRemove item from the DOM when dropped outside sortable areas Requires the OnSpill plugin to be installed.
OptionalsetCustom function to set data on the DataTransfer object during drag start
The DataTransfer object from the drag event
The element being dragged
OptionalstoreKey to use when saving/restoring sort order via localStorage
Used by the save() method.
Optionalset?: (sortable: SortableInstanceForStore) => voidCalled when sort order changes — persist the array
Optionalget?: (sortable: SortableInstanceForStore) => string[]Called on initialization — return the stored order
CSS class applied to the ghost element during drag