Avara UI

Shadcn Kanban Board

A React Kanban board with drag-and-drop cards between columns, spring dragging and a keyboard-friendly grip.

Applies to this page's previews only

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

Agent notes

  • Default export and named KanbanBoard, with types KanbanCardItem, KanbanColumn and KanbanBoardProps, from @/components/custom/kanban-board. The Motion build installs as kanban-board-motion; install one
  • It holds its own order and reports it through onReorder. Pass a new items array to reset it
  • Pass columns ({ id, title }[]; default To do, In progress, Done). A card names its column with column, and a moved card comes back from onReorder with its new column
  • Cards: { id, title, description?, date?, badge?, hue?, linkText?, linkUrl?, column? }. hue is 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
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

ComponentPropTypeDefaultDescription
KanbanBoarditemsKanbanCardItem[]four sample tasksThe cards, in order.
KanbanBoardcolumns{ id, title }[]To do, In progress, DoneThe columns, left to right.
KanbanBoardonReorder(items) => void-Called with the new order after each move.
KanbanBoardtitle / subtitlestring-Heading above the board.
KanbanBoardenableBadgesbooleantrueShow the badge chips.
KanbanBoardclassName / cardClassNamestring-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.