{"schemaVersion":"1.0","record":{"label":"SortableJS","description":"JavaScript library for reorderable lists with cross-list moves, cloning and optional sorting plugins.","aliases":["Sortable"],"kind":"software","website":"https://sortablejs.github.io/Sortable/","overview":"SortableJS adds drag-and-drop ordering to lists of DOM elements. It supports moving items within or between lists, drag handles, cloning and configurable sorting behavior. It is an open-source interaction library rather than a complete board application or a persistence service.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"List movement and cloning","status":"supported","detail":"Shared groups support cross-list movement; clone and receive rules configure transfer behavior.","useCase":"Adding reorderable lists and cross-list item movement to web applications","platforms":["Web","JavaScript"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://sortablejs.github.io/Sortable/","locator":"Shared lists, cloning, handles, filtering and nested sortables","retrievedAt":"2026-10-07T23:35:56Z","kind":"vendor"}]},{"name":"Order persistence","status":"limited","detail":"Store callbacks can save/restore IDs; the documented localStorage example is not server synchronization.","useCase":"Adding reorderable lists and cross-list item movement to web applications","platforms":["Web","JavaScript"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://github.com/SortableJS/Sortable/blob/master/README.md","locator":"Packages, event indices, Store and fallback options","retrievedAt":"2026-10-07T23:36:27Z","kind":"vendor"}]},{"name":"React integration","status":"limited","detail":"Separate wrapper documents readiness and nested-state caveats; stable IDs are required instead of index keys.","useCase":"Adding reorderable lists and cross-list item movement to web applications","platforms":["Web","JavaScript"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://github.com/SortableJS/react-sortablejs/blob/master/README.md","locator":"Production-readiness warning, keys, DOM reconciliation and nesting","retrievedAt":"2026-10-07T23:36:27Z","kind":"vendor"}]},{"name":"Multiple item dragging","status":"supported","detail":"MultiDrag requires plugin setup and handling its multi-item event data.","useCase":"Adding reorderable lists and cross-list item movement to web applications","platforms":["Web","JavaScript"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://github.com/SortableJS/Sortable/blob/master/plugins/MultiDrag/README.md","locator":"Selection and intermediate index caveat","retrievedAt":"2026-10-07T23:37:07Z","kind":"vendor"}]}],"alternatives":[],"slug":"sortablejs","draftAlternatives":[{"targetSlug":"dnd-kit","status":"limited","detail":"Can replace list-reordering interactions when direct DOM-oriented integration is suitable; framework and state integration differ and must be assessed.","useCase":"Adding reorderable lists and cross-list item movement to web applications","platforms":["Web","JavaScript"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://github.com/SortableJS/Sortable/blob/master/README.md","locator":"Packages, event indices, Store and fallback options","retrievedAt":"2026-10-07T23:36:27Z","kind":"vendor"},{"url":"https://github.com/clauderic/dnd-kit/blob/main/README.md","locator":"Framework layers and interaction toolkit","retrievedAt":"2026-10-07T23:36:19Z","kind":"vendor"}]}],"evidence":[{"url":"https://sortablejs.github.io/Sortable/","locator":"Shared lists, cloning, handles, filtering and nested sortables","retrievedAt":"2026-10-07T23:35:56Z","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/README.md","locator":"Packages, event indices, Store and fallback options","retrievedAt":"2026-10-07T23:36:27Z","kind":"vendor"},{"url":"https://github.com/SortableJS/react-sortablejs/blob/master/README.md","locator":"Production-readiness warning, keys, DOM reconciliation and nesting","retrievedAt":"2026-10-07T23:36:27Z","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/plugins/MultiDrag/README.md","locator":"Selection and intermediate index caveat","retrievedAt":"2026-10-07T23:37:07Z","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/plugins/Swap/README.md","locator":"Exchange behavior and swapItem event","retrievedAt":"2026-10-07T23:37:07Z","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/LICENSE","locator":"MIT grant and notice conditions","retrievedAt":"2026-10-07T23:36:27Z","kind":"vendor"},{"url":"https://github.com/clauderic/dnd-kit/blob/main/README.md","locator":"Framework layers and interaction toolkit","retrievedAt":"2026-10-07T23:36:19Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://sortablejs.github.io/Sortable/","locator":"Shared lists, cloning, handles, filtering and nested sortables","retrievedAt":"2026-10-07T23:35:56Z","id":"examples","title":"SortableJS examples","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/README.md","locator":"Packages, event indices, Store and fallback options","retrievedAt":"2026-10-07T23:36:27Z","id":"readme","title":"SortableJS repository documentation","kind":"vendor"},{"url":"https://github.com/SortableJS/react-sortablejs/blob/master/README.md","locator":"Production-readiness warning, keys, DOM reconciliation and nesting","retrievedAt":"2026-10-07T23:36:27Z","id":"react","title":"React bindings documentation","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/plugins/MultiDrag/README.md","locator":"Selection and intermediate index caveat","retrievedAt":"2026-10-07T23:37:07Z","id":"multi","title":"MultiDrag plugin documentation","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/plugins/Swap/README.md","locator":"Exchange behavior and swapItem event","retrievedAt":"2026-10-07T23:37:07Z","id":"swap","title":"Swap plugin documentation","kind":"vendor"},{"url":"https://github.com/SortableJS/Sortable/blob/master/LICENSE","locator":"MIT grant and notice conditions","retrievedAt":"2026-10-07T23:36:27Z","id":"license","title":"SortableJS MIT license","kind":"vendor"},{"url":"https://github.com/clauderic/dnd-kit/blob/main/README.md","locator":"Framework layers and interaction toolkit","retrievedAt":"2026-10-07T23:36:19Z","id":"dnd","title":"dnd kit architecture","kind":"vendor"}],"overviewCitations":["examples","readme"],"licenseCitations":["license"],"sections":[{"id":"lists","heading":"Configuring list interactions","paragraphs":[{"id":"lists-detail","content":[{"text":"A list can be made sortable directly from its element. Shared group configuration enables transfers, while cloning keeps the original item in its source list. Drag handles limit the area that starts movement, and filters can exclude controls or items. Sorting within a source list can be disabled while allowing transfers out of it. These distinctions are useful for interfaces such as an asset palette beside an ordered destination list, where copying and moving have different meanings."}],"citations":["examples"]}]},{"id":"data","heading":"Events and saved ordering","paragraphs":[{"id":"data-detail","content":[{"text":"Events expose movement information, including indices for all children and separate indices counting draggable children. The library's Store interface can read an initial order and save it on drop; the documented example uses localStorage and item IDs. This demonstrates a browser-local persistence hook, not a backend synchronization service. An application's own state and durable ordering need to follow the intended event path."}],"citations":["readme"]}]},{"id":"plugins","heading":"Multi-item and swap behavior","paragraphs":[{"id":"plugins-detail","content":[{"text":"MultiDrag permits selecting several elements and moving them together. Its event payload includes arrays of items and their indices. During sorting, selected elements other than the principal dragged element can have an intermediate new index of -1 because of folding or removal from the DOM. Code should not treat those intermediate values as completed positions. The separate Swap plugin instead exchanges the dragged item with the drop target rather than inserting it through ordinary sorting; it exposes that target as swapItem."}],"citations":["multi","swap"]}]},{"id":"react","heading":"React wrapper qualifications","paragraphs":[{"id":"react-detail","content":[{"text":"The separate react-sortablejs repository explicitly warns that its bindings are not considered production-ready. It explains that Sortable changes DOM nodes and the wrapper reverses some actions so React can reconcile state. Its guide requires stable item keys rather than array indices and records unresolved nested-list state-update behavior. These warnings apply to that integration; they should not be silently generalized to every use of the underlying vanilla library or omitted when recommending it for a React project."}],"citations":["react"]}]},{"id":"setup","heading":"Packaging and reuse","paragraphs":[{"id":"setup-detail","content":[{"text":"The project offers default, core and complete builds, with plugins included or mounted according to the selected build. It documents a native HTML drag-and-drop path and a forceFallback option. Generated integration code should match the actual import and plugin setup instead of assuming every optional behavior is enabled. The MIT license permits reuse and redistribution subject to retaining its notices."}],"citations":["readme","license"]}]},{"id":"comparison","heading":"Substitution considerations","paragraphs":[{"id":"comparison-detail","content":[{"text":"SortableJS can replace "},{"text":"dnd kit","targetSlug":"dnd-kit"},{"text":" for list-focused reordering when a direct DOM-oriented library fits the application. dnd kit offers a layered interaction model with framework adapters and extensible sensors. Neither API can simply replace the other without revisiting events, state updates and styling. Accessibility behavior and framework compatibility should be tested in the finished interface; this submission reports documentation research, not an installation or interaction test."}],"citations":["readme","dnd"]}]}]},"id":"Q889","revision":937,"updatedAt":"2026-10-13T13:51:08Z","sourceUrl":"https://substitutefor.net/entities/Q889?revision=937"}}