# @dnd-kit/react

> [![Stable release](https://img.shields.io/npm/v/@dnd-kit/react.svg)](https://npm.im/@dnd-kit/react)

Latest version **0.5.1** (published 2026-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dnd-kit/react
pnpm add @dnd-kit/react
yarn add @dnd-kit/react
bun add @dnd-kit/react
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.1 |
| Published | 2026-10-15 |
| First published | 2024-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 238.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 17725 |
| Maintainers | clauderic |

## Links

- npm: https://www.npmjs.com/package/@dnd-kit/react
- Repository: https://github.com/clauderic/dnd-kit
- Homepage: https://github.com/clauderic/dnd-kit#readme
- Issues: https://github.com/clauderic/dnd-kit/issues
- npm.io page: https://npm.io/package/@dnd-kit/react

## Dependencies (4)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [@dnd-kit/dom](https://npm.io/package/@dnd-kit/dom.md) ^0.5.1
- [@dnd-kit/state](https://npm.io/package/@dnd-kit/state.md) ^0.5.1
- [@dnd-kit/abstract](https://npm.io/package/@dnd-kit/abstract.md) ^0.5.1

## Recent versions

- 0.5.1 (latest) — 2026-10-15
- 0.5.1-beta-20261015120225 (beta) — 2026-10-15
- 0.5.1-beta-20261015120327 — 2026-10-15
- 0.5.1-beta-20261015120054 — 2026-10-15
- 0.5.1-beta-20261015120014 — 2026-10-15
- 0.5.1-beta-20261015115837 — 2026-10-15
- 0.5.1-beta-20261015115628 — 2026-10-15
- 0.5.1-beta-20261015115554 — 2026-10-15
- 0.5.1-beta-20261015115205 — 2026-10-15
- 0.5.1-beta-20260912195958 — 2026-09-12
- 0.5.1-beta-20260905201412 — 2026-09-05
- 0.5.1-beta-20260905153955 — 2026-09-05
- 0.5.1-beta-20260713030121 — 2026-07-13
- 0.5.1-beta-20260706002929 — 2026-07-06
- 0.5.1-beta-20260627143054 — 2026-06-27
- … 438 more at https://npm.io/package/@dnd-kit/react/versions

## README

# @dnd-kit/react

[![Stable release](https://img.shields.io/npm/v/@dnd-kit/react.svg)](https://npm.im/@dnd-kit/react)

The React adapter for **@dnd-kit** — a lightweight, performant, and extensible drag and drop toolkit. Built on top of `@dnd-kit/dom`.

## Installation

```bash
npm install @dnd-kit/react
```

## Quick start

```tsx
import {DragDropProvider, useDraggable, useDroppable} from '@dnd-kit/react';

function App() {
  const [parent, setParent] = useState(null);

  return (
    <DragDropProvider
      onDragEnd={(event) => {
        if (event.canceled) return;
        setParent(event.operation.target?.id ?? null);
      }}
    >
      {parent == null ? <Draggable /> : null}
      <Droppable>{parent ? <Draggable /> : 'Drop here'}</Droppable>
    </DragDropProvider>
  );
}
```

## Hooks

| Hook           | Import                    | Description                        |
| -------------- | ------------------------- | ---------------------------------- |
| `useDraggable` | `@dnd-kit/react`          | Make an element draggable          |
| `useDroppable` | `@dnd-kit/react`          | Create a drop target               |
| `useSortable`  | `@dnd-kit/react/sortable` | Combine drag and drop with sorting |

## Components

- **`<DragDropProvider>`** — Wraps your drag and drop interface, manages sensors, plugins, and events.
- **`<DragOverlay>`** — Renders a custom overlay element during drag operations.

## Documentation

Visit [dndkit.com](https://dndkit.com/react) for full documentation, guides, and interactive examples.

---
_Source: https://npm.io/package/@dnd-kit/react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
