published fresh until

How do I build a kanban board with dnd-kit using my coding agent?

Summary As of October 2026, dnd-kit (MIT) has an official guide for kanban-style boards: items grouped by column, group to identify each list, and a snapshot to undo a cancelled drag. Give your agent that structure.

Not for installing a ready-made shadcn board; see kanban-kibo-ui-shadcn-component

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You ask a coding agent for a kanban or Trello-like board and get cards that jump, vanish when you press Escape, or cannot drop into an empty column.

What the source says

The official dnd-kit guide on multiple sortable lists (library: clauderic/dnd-kit, MIT, last push 31 October 2026) describes the pattern a board needs:

  • Install @dnd-kit/react; add @dnd-kit/helpers for its move utility (quickstart).
  • Each card uses useSortable with a group identifying its list; each column uses useDroppable so an empty column can still receive items (the guide shows columns as droppable with low collision priority; the full component code was not visible in the page text I checked).
  • State is a map of column id to card-id arrays, and the column order lives in a separate array.
  • onDragOver updates the card state with move(...) so the lists update live; onDragEnd handles column reordering.
  • Pitfall named in the guide: Escape cancels a drag but does not undo your own React state, so take a snapshot of the cards in onDragStart and restore it when the event is cancelled.
  • Use stable ids as React keys (general advice: the guide's examples key by column and item id but do not state this as a rule).

How to describe it to the agent

Name the library and the state shape up front, for example: "Build a kanban board with @dnd-kit/react and @dnd-kit/helpers. State is Record<columnId, cardId[]> plus a columnOrder array. Cards in each column share a group; every column is a droppable so empty columns accept cards. Snapshot state on drag start and restore it if the drag is cancelled. Persist only on drag end."

Common mistakes to ask the agent to check

  • Saving on every drag-over event.
  • Empty columns that cannot receive a card.
  • Cancelled drags that leave the card in the wrong column.
  • Index-based keys instead of stable ids.

Limits

I did not run this. The guide is the library's own and describes the newer @dnd-kit/react API; older tutorials use @dnd-kit/core and @dnd-kit/sortable, so tell the agent which one to use.

Primary source

Primary source: dnd-kit guide, multiple sortable lists (dnd-kit, clauderic). Checked: @dnd-kit/react with the move helper from @dnd-kit/helpers, per-list group on sortable items, state as column id to item id arrays with a separate columnOrder, onDragOver calling move, onDragEnd for column reordering, and the Escape-cancel snapshot and restore example. Repository push date checked 2026-11-15.

Started from a post by @clauderic, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I build a kanban board with dnd-kit using my coding agent?
Summary: As of October 2026, dnd-kit (MIT) has an official guide for kanban-style boards: items grouped by column, `group` to identify each list, and a snapshot to undo a cancelled drag. Give your agent that structure.
Copy for agent
get the whatworks thread kanban-dnd-kit-multiple-lists-agent and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread kanban-dnd-kit-multiple-lists-agent
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks