explaingit

clauderic/dnd-kit

Analysis updated 2026-06-24

17,109TypeScriptAudience · developerComplexity · 3/5Setup · easy

TLDR

Framework-agnostic drag-and-drop toolkit for the web with adapters for React, Vue, Svelte, and SolidJS. Includes sortable lists, keyboard support, and accessibility out of the box.

Mindmap

mindmap
  root((dnd-kit))
    Inputs
      Mouse events
      Touch events
      Keyboard input
    Outputs
      Sortable lists
      Kanban boards
      Screen reader announcements
    Use Cases
      Reorder lists
      Build kanban boards
      Drag between containers
      Build form builders
    Tech Stack
      TypeScript
      React
      Vue
      Svelte
      SolidJS
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add reorderable sortable lists to a task or kanban app

USE CASE 2

Build a form builder where users drag fields onto a canvas

USE CASE 3

Make a file or photo organizer with multi-container drag and drop

USE CASE 4

Add accessible keyboard-driven drag and drop to an existing UI

What is it built with?

TypeScriptReactVueSvelteSolidJS

How does it compare?

clauderic/dnd-kitfoambubble/foamsindresorhus/type-fest
Stars17,10917,11717,132
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasyeasy
Complexity3/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Sensors and collision detection need configuration once you go past the sortable list demo.

In plain English

dnd-kit is a toolkit for building drag-and-drop interfaces in web applications, written in TypeScript. Drag and drop is the UI pattern where a user clicks on an element, holds, moves it to a new position, and releases, like reordering items in a list or moving cards between columns on a kanban board. The library is designed with a layered architecture: there is a framework-agnostic core (meaning it works independently of any specific frontend framework), a web browser layer, and then thin adapters for popular frameworks including React, Vue, Svelte, and SolidJS. This means the same underlying logic powers drag and drop regardless of which frontend tool your project uses. It supports a wide variety of drag-and-drop patterns: sortable lists, grids, items that span multiple containers, nested drag contexts, variable-sized items, and virtualized lists (where only visible items are rendered for performance). Input methods include mouse, touch, and keyboard, and the library has built-in accessibility features, it generates correct screen reader announcements and supports keyboard-only operation out of the box. Everything is customizable: animations, visual transitions, collision detection (how the system decides when a dragged item is "over" a drop target), and key bindings. A separate sortable package handles the common case of reordering items in a list with minimal setup. You would use dnd-kit when building a product that needs drag and drop, task managers, form builders, file organizers, or any interface where users rearrange things visually.

Copy-paste prompts

Prompt 1
Show me a minimal React example that reorders a list with the dnd-kit sortable package
Prompt 2
Build a kanban board with two columns where cards can move between columns using dnd-kit
Prompt 3
Customize collision detection in dnd-kit so dragging snaps to the nearest center
Prompt 4
Wire up keyboard accessibility and screen reader announcements for a dnd-kit sortable list
Prompt 5
Use dnd-kit with a virtualized list of 10000 items and keep performance smooth

Frequently asked questions

What is dnd-kit?

Framework-agnostic drag-and-drop toolkit for the web with adapters for React, Vue, Svelte, and SolidJS. Includes sortable lists, keyboard support, and accessibility out of the box.

What language is dnd-kit written in?

Mainly TypeScript. The stack also includes TypeScript, React, Vue.

How hard is dnd-kit to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is dnd-kit for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub clauderic on gitmyhub

Verify against the repo before relying on details.