React drag and drop libraries

Updated Nov 2026

React drag and drop libraries let people move items on a page with a mouse, a finger, or the keyboard. These libraries handle the drag interactions in kanban boards, sortable lists, dashboards, and file uploads.

Popularity

@dnd-kit/core has the most monthly downloads in this comparison, at 163.1M.

LibraryMonthly downloadsStarsLast releaseLicense
@dnd-kit/core
163.1M
17.8KDec 2024MIT
react-dropzone
75.9M
11.0KNov 2026MIT
react-draggable
42.4M
9.3KSep 2026MIT
@use-gesture/react
39.1M
9.6KMar 2024MIT
react-dnd
26.4M
21.6KApr 2022MIT
react-grid-layout
23.0M
22.5KOct 2026MIT
@hello-pangea/dnd
20.2M
4.1KFeb 2025Apache-2.0
@dnd-kit/react
10.8M
17.8KOct 2026MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

@dnd-kit/core is the original React package of dnd kit, a drag and drop toolkit with no outside dependencies. The useDraggable and useDroppable hooks turn existing elements into draggable items and drop areas, and a DndContext provider reports drag events and holds the sensors for pointer, mouse, touch, and keyboard input. The @dnd-kit/sortable preset, built on the core, handles sortable lists and grids. The dnd kit quickstart now calls this package legacy and starts new projects on @dnd-kit/react.

Downloads / mo
163.1M
Stars
17.8K
Last release
6.3.1
License
MIT

Strengths

  • Keyboard and screen readers. Keyboard sensors, default aria attributes, and live region announcements are built in.
  • Sortable preset. @dnd-kit/sortable adds sortable lists, grids, and multiple containers on top of the core.

Limitations

  • Legacy package. The dnd kit docs mark @dnd-kit/core as legacy and give a migration guide to @dnd-kit/react.
  • No desktop file drops. The core doesn't handle dragging from the desktop or between windows.

Quickstart

From getting-started.md
$ npm install @dnd-kit/core@6.3.1
import React from 'react';
import {DndContext, useDraggable} from '@dnd-kit/core';
function Draggable() {
  const {attributes, listeners, setNodeRef, transform} = useDraggable({id: 'draggable'});
  const style = transform ? {transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`} : undefined;
  return <button ref={setNodeRef} style={style} {...listeners} {...attributes}>Drag me</button>;
}
export default function App() {
  return <DndContext><Draggable /></DndContext>;
}

@dnd-kit/core examples

From open-source projects on GitHub

react-dropzone

react-dropzone is a React hook, useDropzone, that turns an element into a drop area for files dragged from the desktop and connects it to a hidden file input. getRootProps and getInputProps attach to the drop area and the input, onDrop receives the accepted files, and isDragActive reports when files hover over the area. A Dropzone component wraps the same hook. Sending the files to a server is left to another client.

Downloads / mo
75.9M
Stars
11.0K
Last release
20.2.1
License
MIT

Strengths

  • Creates file drop areas. Connect a root element and file input with the returned prop getters.
  • Opens the picker from keyboard. Press Enter or Space when the dropzone root has focus.

Limitations

  • Uploads need a separate client. The hook hands over File objects, and another library or fetch uploads them.

Quickstart

From README.md
$ npm install react-dropzone@20.2.1
import React from "react";
import { useDropzone } from "react-dropzone";

export default function App() {
  const { getRootProps, getInputProps } = useDropzone({
    onDrop: files => console.log(files),
  });
  return (
    <div {...getRootProps()}>
      <input {...getInputProps()} />
      Drop or choose files
    </div>
  );
}

react-dropzone examples

From open-source projects on GitHub

react-draggable

react-draggable makes one element draggable by wrapping it in a Draggable component, which moves the element with a CSS transform and adds no wrapper element. Props limit movement to one axis, keep it inside bounds, or restrict dragging to a handle, and onStart, onDrag, and onStop report each move. DraggableCore reports the same drag events without moving anything. Passing a nodeRef that points to the child's DOM node avoids deprecation warnings in React Strict Mode.

Downloads / mo
42.4M
Stars
9.3K
Last release
4.7.2
License
MIT

Strengths

  • Moves an existing DOM element. Wrap the element without adding a new DOM wrapper.
  • Offers controlled positions. Set position when application state should choose the coordinates.

Limitations

  • Overwrites the child's transform. Draggable sets the child's CSS transform. An inner wrapper element keeps an existing transform.
  • Custom children forward props. A custom child component passes the ref and event props through to its DOM element.
  • No drop targets. The library moves elements; what happens where they land is up to the app.

Quickstart

From README.md
$ npm install react-draggable@4.7.2
import React, { useRef } from 'react';
import Draggable from 'react-draggable';
export default function App() {
  const nodeRef = useRef(null);
  return (
    <Draggable nodeRef={nodeRef}>
      <div ref={nodeRef}>Drag me!</div>
    </Draggable>
  );
}

react-draggable examples

From open-source projects on GitHub

@use-gesture/react

@use-gesture/react binds mouse and touch gestures, such as drag, pinch, wheel, scroll, move, and hover, to any element through hooks like useDrag. Each handler receives the gesture's state, such as down and movement, and the app decides what to move. The README pairs it with an animation library such as react-spring. A plain JavaScript version ships as @use-gesture/vanilla.

Downloads / mo
39.1M
Stars
9.6K
Last release
10.3.1
License
MIT

Strengths

  • Many gestures. Drag, pinch, wheel, scroll, move, and hover share one hook API.
  • Any animation library. Gesture data can drive react-spring or any other animation code.

Limitations

  • No drop targets. The library reports pointer movement; drop areas and sorting are written by the app.
  • Touch needs touch-action. Draggable elements set touchAction: 'none' so the page doesn't scroll during a drag.

Quickstart

From README.md
$ npm install @use-gesture/react@10.3.1
import React, { useState } from "react";
import { useDrag } from "@use-gesture/react";

export default function App() {
  const [[x, y], setPosition] = useState([0, 0]);
  const bind = useDrag(({ down, movement: [mx, my] }) => {
    setPosition(down ? [mx, my] : [0, 0]);
  });
  return <div {...bind()} style={{ transform: `translate(${x}px, ${y}px)`, touchAction: "none" }}>Drag me</div>;
}

@use-gesture/react examples

From open-source projects on GitHub

React DnD builds drag and drop from typed items. useDrag declares a drag source with an item type, and useDrop declares a target that accepts certain types and decides what a drop does. A backend translates browser events, and the app wraps itself in DndProvider with a backend, such as the one built on the browser's HTML drag and drop events. That HTML backend also accepts files dragged from the desktop through NativeTypes.FILE.

Downloads / mo
26.4M
Stars
21.6K
Last release
16.0.1
License
MIT

Strengths

  • Supports custom drop-target types. Choose which item types each useDrop target accepts.
  • Accepts native files through HTML5. Use NativeTypes.FILE with the HTML5 backend for dropped files.

Limitations

  • Touch needs another backend. The HTML backend ignores touch events, and the touch backend handles phones and tablets.

Quickstart

From useDrag.md
$ npm install react-dnd@16.0.1 react-dnd-html5-backend@16.0.1
import React from 'react';
import {DndProvider, useDrag} from 'react-dnd';
import {HTML5Backend} from 'react-dnd-html5-backend';
function Box() {
  const [{isDragging}, drag] = useDrag(() => ({type: 'BOX', item: {id: 'box'}, collect: monitor => ({isDragging: monitor.isDragging()})}));
  return <div ref={node => {drag(node);}} style={{opacity: isDragging ? 0.5 : 1}}>Drag me</div>;
}
export default function App() {
  return <DndProvider backend={HTML5Backend}><Box /></DndProvider>;
}

react-dnd examples

From open-source projects on GitHub

react-grid-layout

react-grid-layout arranges items on a draggable, resizable grid, such as a dashboard of tiles, with a separate layout for each responsive breakpoint. A layout array gives each item a position and size in grid units, and a compactor packs items vertically, horizontally, or by a custom rule as others move. The current major version is a TypeScript rewrite with hooks such as useContainerWidth, which measures the container so the grid knows its width.

Downloads / mo
23.0M
Stars
22.5K
Last release
2.3.0
License
MIT

Strengths

  • Responsive breakpoints. Each breakpoint gets its own layout, supplied by the app or generated.
  • Resizable items. Tiles resize from a handle as well as move.

Limitations

  • Needs a container width. The grid takes its width from useContainerWidth or a width prop before it renders.
  • Stylesheets imported separately. The grid and react-resizable CSS files are imported next to the component.

Quickstart

From README.md
$ npm install react-grid-layout@2.3.0
import React from "react";
import GridLayout, { useContainerWidth } from "react-grid-layout";
import "react-grid-layout/css/styles.css";
import "react-resizable/css/styles.css";

export default function App() {
  const { width, containerRef, mounted } = useContainerWidth();
  const layout = [{ i: "a", x: 0, y: 0, w: 2, h: 2 }];
  return (
    <div ref={containerRef}>
      {mounted && <GridLayout width={width} layout={layout} gridConfig={{ cols: 12, rowHeight: 30 }}>
        <div key="a">Drag or resize me</div>
      </GridLayout>}
    </div>
  );
}

react-grid-layout examples

From open-source projects on GitHub

@hello-pangea/dnd

@hello-pangea/dnd reorders items in vertical and horizontal lists and moves them between lists. A DragDropContext wraps the lists and reports the result in onDragEnd, each Droppable marks a list, and each Draggable marks an item with its index. Mouse, touch, and keyboard dragging, screen reader announcements, auto-scrolling, and virtual lists are supported. The package continues react-beautiful-dnd under a new name.

Downloads / mo
20.2M
Stars
4.1K
Last release
18.0.1
License
Apache-2.0

Strengths

  • Keyboard and screen readers. Keyboard dragging and screen reader announcements work without extra setup.
  • No wrapper elements. Items render without extra wrapper DOM nodes.

Limitations

  • Lists only. Items move within and between lists; free-form grids take another library.

Quickstart

From drag-drop-context.md
$ npm install @hello-pangea/dnd@18.0.1
import React from 'react';
import {DragDropContext, Droppable, Draggable} from '@hello-pangea/dnd';
export default function App() {
  return (
    <DragDropContext onDragEnd={() => {}}>
      <Droppable droppableId="list">
        {provided => (
          <div ref={provided.innerRef} {...provided.droppableProps}>
            <Draggable draggableId="item" index={0}>
              {provided => <div ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps}>Drag me</div>}
            </Draggable>
            {provided.placeholder}
          </div>
        )}
      </Droppable>
    </DragDropContext>
  );
}

@hello-pangea/dnd examples

From open-source projects on GitHub

@dnd-kit/react

@dnd-kit/react is the current React package of dnd kit, a thin layer over its framework-independent core. useDraggable and useDroppable take an id and return a ref to attach to an element, and a DragDropProvider reports drag events such as onDragEnd. Sortable lists use useSortable from the @dnd-kit/react/sortable subpath, with the move helper from @dnd-kit/helpers.

Downloads / mo
10.8M
Stars
17.8K
Last release
0.5.3
License
MIT

Strengths

  • Refs, not spread props. Each hook returns a ref to attach to the element, with no listeners spread onto it.
  • Sortable subpath. Sortable lists come from @dnd-kit/react/sortable in the same package.

Limitations

  • Different API from the core. Code written for @dnd-kit/core changes imports and events, following a migration guide.

Quickstart

From quickstart.md
$ npm install @dnd-kit/react@0.5.3
import React from "react";
import { DragDropProvider, useDraggable } from "@dnd-kit/react";

function Item() {
  const { ref } = useDraggable({ id: "item" });
  return <button ref={ref}>Drag me</button>;
}

export default function App() {
  return <DragDropProvider><Item /></DragDropProvider>;
}

@dnd-kit/react examples

From open-source projects on GitHub

FAQ

For sortable lists, boards, and custom drop logic, use dnd kit. To reorder lists with built-in keyboard and screen reader support, use @hello-pangea/dnd. For dashboards of resizable tiles, use react-grid-layout, and for files dragged from the desktop, use react-dropzone.

dnd kit attaches drag behavior with hooks and ships pointer, touch, and keyboard input in one package. React DnD routes events through a backend: the HTML backend handles the mouse and files dragged from the desktop, and touch screens need the separate touch backend.

@hello-pangea/dnd continues react-beautiful-dnd under a new package name, with the same DragDropContext, Droppable, and Draggable components.

react-grid-layout places each tile by position and size in a layout array, lets tiles be dragged and resized, and supports a separate layout for each responsive breakpoint.

react-dropzone returns getRootProps and getInputProps from useDropzone. The first goes on the drop area and the second on a hidden file input, and onDrop receives the files.

react-draggable wraps an element in Draggable and moves it with a CSS transform. @use-gesture/react reports drag movement from a hook and leaves the moving to the app.

For coding agents

Found your drag and drop library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official