SortableJS adds reorderable drag-and-drop to lists in modern browsers and on touch devices. It works without jQuery and integrates with common front-end frameworks.
Overview
SortableJS is a JavaScript package for making list items draggable and reorderable in web pages. It targets modern browsers and touch hardware, using the native HTML5 drag-and-drop API with optional fallback behavior where needed.
Lists can stand alone or share items through configurable groups, including clone modes when copying between lists. The library exposes many tuning options for animation, handles, filters, delayed drags, swap thresholds, nested layouts, and multi-item selection.
Optional plugins extend behavior for auto-scrolling, spill handling, multi-drag selection, and swap-style interactions instead of pure sorting. Wrapper packages exist for Vue, React, Angular, and other stacks, and styling can follow any CSS toolkit.
Typical integration imports the module, attaches Sortable to a container element, and listens to move or change events to persist order. Store helpers can save and restore ordering state in the browser.
Key features
- Within-list and cross-list dragging
- Touch and mobile-friendly dragging
- CSS animations and transform support
- Drag handles and text selection
- Grouped lists with clone mode
- Nested and grid sortable layouts
- Multi-drag and swap plugins
- Framework wrapper integrations
Use cases
- Kanban-style task boards
- Configurable admin list ordering
- Nested menu or outline editors
- Touch-friendly mobile reordering
- Form builder block arrangement