Pro (paid add-on)
Kanban
ProKanban is a board of columns and cards, with drag and drop, full keyboard moves, a menu for moving without dragging, and work-in-progress limits.
Part of Pro
This page documents part of @vjdesigns-pro/ui, the paid add-on package. Using it needs a Pro license and @vjdesigns/vjdesigns-ui 3.8.0 or later. Like the free package, it works in both modes, every brand, all 32 languages and right to left. Install it as described in Account forms.
Example
A board of columns and cards: a recruiting pipeline, a season plan, a to-do list. A card's column is its column, and its place in the column is its order in cards. onCardsChange gives you every card in the new order plus the move, so you can save the whole list or just the change.
import { Kanban, type KanbanCard } from "@vjdesigns-pro/ui";
const [cards, setCards] = useState<KanbanCard[]>([
{ id: "1", column: "watch", title: "Jordan Lee", meta: "Point guard · Class of 2027" },
{ id: "2", column: "offer", title: "Avery Brooks", labels: ["Forward"] },
]);
<Kanban
aria-label="Recruiting pipeline"
columns={[
{ id: "watch", title: "Watching" },
{ id: "offer", title: "Offered", limit: 5 },
]}
cards={cards}
onCardsChange={(next, move) => {
setCards(next);
saveMove(move.card.id, move.to); // { column, index }
}}
onCardSelect={openProfile}
onCardAdd={(column) => startNewCard(column)}
/>;
Cards and moves
- Content: a title, plus an optional
description,labelsandmeta. Or passrenderCardfor your own layout; the title still names the card. - Moving cards: drag with a mouse or pen, and a dashed placeholder shows where it will land. From the keyboard, Space picks a card up, the arrow keys move it, Space drops it, and Escape puts it back.
- No dragging needed: each card's menu has Move up, Move down and Move to each column, for touch and single-pointer users. Every move is announced ("Scout Ridge Arena: position 2 of 4 in In progress").
- Work-in-progress limits: a column's
limitshows as "3 of 5", and going over adds an "Over limit" badge (text, not just color). Limits warn; they don't block.
Keyboard
The cards are one Tab stop, and Tab then reaches the focused card's menu. The arrow keys move between cards, Home and End go to the first and last in a column, and Enter opens one.
Props
Kanban
A board of columns and cards: a recruiting pipeline, a season plan, a to-do list. Cards move between and within columns by dragging, from the keyboard, or from each card's menu, and every move is reported with onCardsChange and announced. Columns can show a work-in-progress limit.
Accessibility: each column is a labeled section with a heading and a list of cards. The cards are one Tab stop: arrow keys move between them (Home / End: the column's first and last), Enter opens one, and Space picks it up. While a card is picked up, the arrow keys move it, Space drops it, and Escape puts it back; each step is announced ("Practice plan: position 2 of 4 in In progress"). Each card's menu (Move up, Move down, Move to a column) does the same without dragging, for touch and single-pointer use.
<Kanban
aria-label="Recruiting pipeline"
columns={[{ id: "watch", title: "Watching" }, { id: "offer", title: "Offered", limit: 5 }]}
cards={cards}
onCardsChange={(next) => setCards(next)}
onCardSelect={openProfile}
/>
| Prop | Type | Default |
|---|---|---|
aria-labelRequiredAccessible name of the board (e.g. "Recruiting pipeline"). | string | — |
columnsRequiredThe columns, in order. | readonly KanbanColumn[] | — |
cardsThe cards (controlled). A card's place in its column is its order here. | readonly KanbanCard[] | — |
defaultCardsInitial cards when uncontrolled. | readonly KanbanCard[] | — |
onCardsChangeCalled after a card moves, with every card in the new order and the move itself. | (cards: KanbanCard[], move: KanbanMove) => void | — |
onCardSelectCalled when a card is clicked or opened with Enter. | (card: KanbanCard) => void | — |
onCardAddShows an "Add card" button under each column, called with the column's id. | (column: string) => void | — |
renderCardCustom card content, in place of the title, description, labels, and meta. The title still names the card. | (card: KanbanCard) => ReactNode | — |
columnHeadingLevelHeading level of the column titles. | 23456 | 3 |
columnWidthWidth of each column (CSS length). | string | "18rem" |
classNameClass name for the root. | string | — |
styleStyle for the root. | CSSProperties | — |
KanbanCard
One card on the board.
| Prop | Type | Default |
|---|---|---|
idRequiredUnique id. | string | — |
columnRequiredThe | string | — |
titleRequiredShort name: shown on the card and used in announcements. | string | — |
descriptionA line or two of detail, under the title. | string | — |
labelsSmall tags shown as badges (a position, a priority). | readonly string[] | — |
metaOne line at the bottom (an owner, a due date). | string | — |
KanbanColumn
One column of the board.
| Prop | Type | Default |
|---|---|---|
idRequiredMatched by each card's | string | — |
titleRequiredColumn heading. | string | — |
limitWork-in-progress limit: the count shows against it, and going over is flagged with text. | number | — |
KanbanMove
A card's move, as reported with onCardsChange.
| Prop | Type | Default |
|---|---|---|
cardRequired | KanbanCard | — |
fromRequired | KanbanPosition | — |
toRequired | KanbanPosition | — |
KanbanPosition
Where a card is: its column and its index in that column.
| Prop | Type | Default |
|---|---|---|
columnRequired | string | — |
indexRequired | number | — |