A layered toolkit for building drag-and-drop UIs on the web. It offers a framework-agnostic core plus DOM and framework adapters.
Overview
dnd kit is a TypeScript toolkit for adding drag-and-drop to web pages. The design stacks a framework-agnostic core, a DOM implementation, and thin adapters for React, Vue, Svelte, Solid, and plain JavaScript or TypeScript.
It targets lists, grids, multiple containers, nested contexts, variable item sizes, virtualized lists, and two-dimensional layouts. Built-in sensors cover pointer, mouse, touch, and keyboard input. Users can customize animations, transitions, collision detection, key bindings, and ARIA behavior.
Sortable reordering is available through a dedicated sortable layer on top of the core. Documentation, API reference, guides, and interactive examples are published at dndkit.com.
The package set is published as multiple npm modules under the @dnd-kit scope for different framework entry points.
Key features
- Framework-agnostic layered core
- React, Vue, Svelte, Solid adapters
- Pointer, mouse, touch, keyboard sensors
- Sortable lists and grids
- Custom collision and plugins
- Keyboard and ARIA accessibility
- Virtualized and nested drag contexts
- Vanilla JavaScript support
Use cases
- Reorderable task or kanban lists
- Sortable tables and grids
- Multi-container drag between zones
- Nested sortable categories
- Game boards with 2D dragging