React DnD

A set of React hooks and utilities for building complex drag-and-drop interfaces without coupling your components to the DOM.

Library
npm
v16.0.1
21,634stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
53/100Fair
Development Activity0
Maintenance44
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture88
Code Quality82
Innovation80
Learning Curve55

React DnD is a drag-and-drop library for React that helps you build sophisticated interfaces like sortable lists, kanban boards, and file drop zones. Rather than wrapping components in opaque widgets, it exposes a set of hooks (useDrag, useDrop, useDragLayer) that let your own components declare what they drag, what they accept, and how they respond, while a framework-agnostic core engine tracks drag state.

It separates the drag-and-drop logic from the rendering backend, shipping HTML5 and touch backends that can be swapped out, and keeps your components testable by moving the imperative browser event handling behind a declarative monitor and connector API.

What You Get

  • The useDrag, useDrop, and useDragLayer hooks for wiring up drag sources, drop targets, and custom drag layers
  • A framework-agnostic dnd-core engine that manages drag state independently of the rendering layer
  • Swappable backends including an HTML5 backend and a touch backend for mobile support
  • A monitor and connector API that keeps browser event handling out of your component code
  • First-class TypeScript types for drag items, collected props, and drop results

Common Use Cases

  • Building sortable lists and reorderable kanban-style boards
  • Implementing file and card drop zones with visual feedback
  • Creating custom drag previews and drag layers decoupled from the DOM
  • Adding drag-and-drop to complex React apps while keeping components unit-testable

Under The Hood

Architecture - React DnD is split into a rendering-agnostic core (dnd-core) and a React binding layer (react-dnd). The core exposes a DragDropManager backed by a small redux store that holds drag state, a HandlerRegistry for registered sources and targets, and a DragDropMonitor for querying state; backends (HTML5, touch) translate raw browser events into core actions. In the React layer, hooks such as useDrag (src/hooks/useDrag) and useDrop compose smaller hooks that register a spec, subscribe a monitor, collect derived props, and return connector refs, keeping React re-renders driven by monitor subscriptions rather than DOM events.

Tech Stack - The library is written in TypeScript and published as a monorepo built with Turborepo and SWC, emitting both ESM and CommonJS bundles plus type declarations. Runtime dependencies are deliberately small: dnd-core for the engine, fast-deep-equal and hoist-non-react-statics, plus internal @react-dnd/invariant and @react-dnd/shallowequal utilities. It targets React 16.14+ via peer dependencies and keeps @types/react optional.

Code Quality - The codebase favors many small, single-responsibility hook modules and typed public APIs, using invariant checks to surface misuse (for example, guarding against the deprecated spec.begin). Testing is real and colocated: tests directories exist across core, internals, and each hook (useDrag, useDrop), exercised with Jest and @testing-library/react plus a dedicated test backend, and coverage is tracked via codecov.

API Design - The public surface is compact and ergonomic: three primary hooks return tuples of collected props and connector refs, and generic parameters let callers type the drag item, collected props, and drop result. The declarative spec object (item, collect, canDrop, drop) reads clearly, though the monitor/connector model and backend setup impose a real conceptual learning curve for newcomers, offset by extensive official docs, tutorials, and examples.

Used by 38 apps in this directory

TypeScript
94%
MIT

Actual

Invoicing Finance

28,224

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

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

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
TypeScript
66%
Apache 2.0

Appsmith

Developer Tools · Automation · No Code Platforms

40,707

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
94
Repo Health
79
Technical
68
Dependency
Built with
TypeScript66%
Java22%
Updated today
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,041

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
65
Dependency
Built with
JavaScript99%
Updated 6 days ago
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,633

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
65
Repo Health
76
Technical
63
Dependency
Built with
JavaScript90%
Updated 1 months ago
TypeScript
99%
Apache 2.0

Colanode

Knowledge Management · Team Chat · Collaboration

5,018

Local-first, self-hosted workspace that combines real-time chat, Notion-style pages, and structured databases — all synced via CRDTs so you work offline without losing a keystroke.

View details
47
Repo Health
73
Technical
73
Dependency
Built with
TypeScript99%
Updated 4 months ago
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,394

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
88
Repo Health
82
Technical
70
Dependency
Built with
TypeScript45%
Rust43%
Updated today
TypeScript
54%
Other

Focalboard

Productivity · Project Management · Collaboration

26,409

Self-hosted, open source project management with Kanban, table, gallery, and calendar views — a privacy-first alternative to Trello, Notion, and Asana.

View details
58
Repo Health
82
Technical
67
Dependency
Built with
TypeScript54%
Go40%
Updated 3 months 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

Search