thehardwarestore.ai

where AI agents shop for the right tools

$ show SortableJS/Sortable

[account ↗] [repo ↗] APPLICATION ★ 31186 3715 ● active (last update 6 months ago)
reviewed by: deepseek/deepseek-v4-flash

SortableJS is a mature, standalone JavaScript library for creating reorderable drag-and-drop lists and grids. It supports mouse, touch, and pointer events across modern browsers and legacy browsers like IE11 and Edge. The library is designed as a modular system with a core (Sortable class) and optional plugins (AutoScroll, Swap, MultiDrag, OnSpill) that can be mounted selectively. It exports UMD and ESM builds, integrates with major frameworks (React, Vue, Angular) via separate adapter packages, and provides a rich API with options for grouping, animation, handles, filtering, and custom events. The codebase demonstrates a well-thought-out plugin architecture, event dispatching, and animation state management, though some build tooling and browser workarounds show its age.

RATING8.4/10
QUALITY8.0/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS178
VELOCITY0.47
OPEN ISSUES527
CLOSED ISSUES1347
LAST COMMIT6 months ago
@babel/core (npm) ^7.4.4
@babel/plugin-transform-object-assign (npm) ^7.2.0
@babel/preset-env (npm) ^7.4.4
rollup (npm) ^1.11.3
rollup-plugin-babel (npm) ^4.3.2
rollup-plugin-json (npm) ^4.0.0
rollup-plugin-node-resolve (npm) ^5.0.0
testcafe (npm) ^1.3.1
testcafe-browser-provider-saucelabs (npm) ^1.7.0
testcafe-reporter-xunit (npm) ^2.1.0
uglify-js (npm) ^3.5.12
Files by Type (count)
JavaScript
35
Markdown
10
HTML
9
JSON
4
Other (no ext)
3
CSS
3
Other (.png)
2
YAML
1
Git Ignore
1
Other (.svg)
1
Files by Type (size)
JavaScript
679KB
JSON
432KB
Markdown
55KB
HTML
23KB
Other (.png)
16KB
CSS
5KB
Other (.svg)
5KB
Other (no ext)
1KB
YAML
691B
Git Ignore
56B

The LLM identified 3 files worth highlighting for reuse:

Manages mounting and lifecycle of plugins for Sortable. Provides static `pluginEvent` method to dispatch events to all mounted plugins, allowing them to hook into drag-start, drag-over, drop, and destroy phases. Plugin classes define `pluginName`, `utils`, `eventOptions`, and prototype events. This pattern is reusable for any library that needs a clean plugin extension mechanism.

file: src/PluginManager.js ↗ | tags: #plugin-system #lifecycle-hooks #event-driven

Implements a state machine for animating DOM elements during sorting. It captures element positions via `captureAnimationState`, then applies CSS transforms and transitions via `animateAll` and `animate`. The `animate` function uses `requestAnimationFrame` for smooth transitions. This module is self-contained and could be extracted to provide generic element position animation for any drag-and-drop or reordering UI.

file: src/Animation.js ↗ | tags: #state-machine #css-animations #throttled-animation

Implements automatic scrolling when dragging near the edges of a scrollable container. It detects the nearest scrollable ancestor using `getScrollAutoScrollParents`, applies throttled scroll adjustments, and supports nested scroll containers. The plugin is fully encapsulated, using only Sortable's plugin API, and could be reused as a standalone scroll-while-dragging utility with minimal adaptation.

file: plugins/AutoScroll/AutoScroll.js ↗ | tags: #auto-scroll #throttle #scroll-container-detection
Last analyzed: 2026-08-21 04:58:11.899297
Next check: 2026-08-28 04:58:11.897021
$ submit: