Shadcn Kanban Board
A React Kanban board with drag-and-drop cards between columns, spring dragging and a keyboard-friendly grip.
About Shadcn Kanban Board
What it is. KanbanBoard is a drag-and-drop Kanban board for React. Cards carry a title, a note, a date, a badge and an optional link, and sit in columns you define. It reports every move through onReorder.
How it is built. It ships as a GSAP build (the default) and a Motion build. Both lift a copy of the held card, find the column and slot under the pointer and glide the other cards aside, then settle the card home on release. A mouse or pen drags from anywhere on a card; a finger drags by the grip so the page still scrolls. On narrow screens the columns scroll sideways, and the lane scrolls itself while a card is held near its edge.
When to use it. Task boards, sprint boards, status pipelines and roadmaps where items move between stages. For a single reorderable list, use Draggable Card List.
For AI agents
Hand your agent this brief or the Markdown page, not a screenshot.
When to use
- A board where people move rich items between stages: tasks, sprints, support tickets, hiring pipelines
When not to use
- A single list where people only set the order: use Draggable Card List
- Sorting a table by column: use Data Table
Agent notes
- Default export and named
KanbanBoard, with typesKanbanCardItem,KanbanColumnandKanbanBoardProps, from@/components/custom/kanban-board. The Motion build installs askanban-board-motion; install one - It holds its own order and reports it through
onReorder. Pass a newitemsarray to reset it - Pass
columns({ id, title }[]; default To do, In progress, Done). A card names its column withcolumn, and a moved card comes back fromonReorderwith its newcolumn - Cards:
{ id, title, description?, date?, badge?, hue?, linkText?, linkUrl?, column? }.hueis 0 to 360; without it the colour comes from the badge, so it stays the same - Keyboard: focus the grip and press Arrow Up or Arrow Down to move within a column, Arrow Left or Arrow Right to move to the next column
- Honours
prefers-reduced-motion
- Markdown
- /docs-md/nextjs-kanban-board.md
- Install
npx shadcn@latest add https://avaraui.com/r/kanban-board.json- Registry name
@avara-ui/kanban-board, through the shadcn MCP server- Index
- llms.txt lists every page, or add the agent skill once
Props Reference
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
KanbanBoard | items | KanbanCardItem[] | four sample tasks | The cards, in order. |
KanbanBoard | columns | { id, title }[] | To do, In progress, Done | The columns, left to right. |
KanbanBoard | onReorder | (items) => void | - | Called with the new order after each move. |
KanbanBoard | title / subtitle | string | - | Heading above the board. |
KanbanBoard | enableBadges | boolean | true | Show the badge chips. |
KanbanBoard | className / cardClassName | string | - | Classes for the board and for each card. |
Works with other components
- Open a card's details in a Drawer from its link.
- Show progress through the board with Counter (
circular). - Use Draggable Card List when there is one list and no stages.
How do I build a Kanban board with shadcn/ui?
Install kanban-board from the registry, pass columns and items (each with a column id) and render KanbanBoard. It uses your theme's CSS variables, so it follows your shadcn/ui colours and dark mode.
How do I get the new order after a drag?
Pass onReorder. It receives the whole array in its new order after every move, and each moved card carries its new column, so you can save it. The board keeps the order itself, so you do not have to feed it back.
Can I move cards with the keyboard?
Yes. Tab to a card's grip and press Arrow Up or Arrow Down to move it within its column, or Arrow Left or Arrow Right to move it to the next column. A screen reader hears the new column and position.
Does dragging work on touch screens?
Yes, by the grip. A finger on the body of a card scrolls the page, and a finger on the grip drags the card. A mouse or a pen can drag from anywhere on the card.
What is the difference between the GSAP and Motion builds?
They look and move the same. Install kanban-board for the GSAP build or kanban-board-motion for the Motion one, whichever your project already uses; one item never ships both.