React Sortable HOC

A set of higher-order components that turn any list into an animated, accessible, touch-friendly sortable list.

Library
npm
v2.0.0
10,886 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
42 /100 Fair
Development Activity 0
Maintenance 0
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
69 /100 Good
Architecture 72
Code Quality 68
Innovation 70
Learning Curve 65

React Sortable HOC provides SortableContainer, SortableElement, and SortableHandle higher-order components that wrap existing React components to add smooth, animated drag-to-reorder behavior — without relying on the HTML5 Drag & Drop API, which has known limitations around touch devices, axis locking, and animation. It supports horizontal, vertical, and grid sorting, works alongside virtualization libraries, and includes keyboard-accessible sorting out of the box.

The project is no longer under active feature development: the maintainer has redirected new development effort to @dnd-kit, a modern successor with feature parity and built-in accessibility, and warns that react-sortable-hoc depends on React’s findDOMNode, which is slated for eventual removal. It still receives critical security updates and remains widely used in production codebases that adopted it before the deprecation notice.

What You Get

  • SortableContainer, SortableElement, and SortableHandle higher-order components for composing sortable lists
  • Support for horizontal, vertical, or grid (xy) sorting axes
  • Keyboard-accessible sorting with configurable key codes
  • Compatibility with virtualization libraries like react-virtualized and react-tiny-virtual-list
  • Touch support and configurable press delay/threshold for mobile drag activation
  • Smooth 60fps animated reordering without relying on the HTML5 Drag & Drop API

Common Use Cases

  • Reorderable to-do lists, kanban cards, or settings panels
  • Drag-to-reorder image galleries or file upload queues
  • Sortable table rows or grid layouts that also need keyboard accessibility
  • Lists rendered with virtualization libraries that still need drag-to-reorder support

Under The Hood

Architecture - The library is organized around three HOC factories under src/: SortableContainer/ manages the shared drag state (active index, position deltas) and owns the pointer/touch event listeners; SortableElement/ wraps individual list items so they can report their DOM node and index back to the container; SortableHandle/ restricts drag initiation to a sub-element rather than the whole item. AutoScroller/ implements edge-of-viewport auto-scrolling during a drag, and Manager/ tracks the registered sortable elements and their positions so the container can compute reordering and animate the shift with CSS transforms rather than reflowing the DOM. Tech Stack - Written in plain JavaScript (ES2015+) with rollup.config.js producing CommonJS, ESM, and UMD builds; it has invariant and prop-types-style runtime checks but no TypeScript source (type declarations are hand-maintained under types/). Code Quality - The examples/ directory doubles as manual integration coverage for the various axis/handle/virtualization configurations documented in the README; the project predates widespread adoption of automated component testing tools in this ecosystem, and the maintainer’s own deprecation notice acknowledges the architecture’s dependence on the deprecated findDOMNode API as a structural risk going forward. API Design - The higher-order-component pattern (SortableContainer(ListComponent), SortableElement(ItemComponent)) lets consumers add sortable behavior to existing components without restructuring them, which was ergonomic for the HOC era but is a heavier integration model than the render-prop/hooks-based API of its suggested successor, @dnd-kit.

Used by 5 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
53%
Other

Chaskiq

CRM · Customer Support

3,574

Self-hosted live chat, video calls, help center, and marketing automation — a full-stack Intercom alternative you run on your own infrastructure.

View details
57
Repo Health
66
Technical
66
Dependency
Built with
TypeScript 53%
Ruby 36%
Updated 3 months ago
JavaScript
65%
Other

GDevelop

Design Tools · Developer Tools · Game Development

26,937

No-code, open-source game engine for building 2D, 3D and multiplayer games — publish to iOS, Android, Steam and the web.

View details
93
Repo Health
82
Technical
61
Dependency
Built with
JavaScript 65%
C++ 23%
TypeScript 11%
Updated 4 days ago
TypeScript
97%
Other

GrowthBook

Ab Testing Experimentation · Analytics · Developer Tools

8,446

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
63
Dependency
Built with
TypeScript 97%
Updated 4 days ago
Python
46%
Other

Redash

Analytics · Data Engineering

28,817

Redash lets anyone connect to 35+ SQL and NoSQL data sources, write a query in the browser, and turn the result into a shared dashboard — no separate BI suite required.

View details
92
Repo Health
74
Technical
60
Dependency
Built with
Python 46%
JavaScript 30%
TypeScript 17%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers