Examples

Supplier onboarding board

Preview
Ready
  1. Review supplier quote
  2. Approve contract
In progress
  1. Confirm delivery dates
Done

No cards

Example.tsx
import { useState } from 'react';
import { KanbanBoard, type KanbanCard } from '@reactloom/dnd';

const columns = [
  { id: 'ready', label: 'Ready' },
  { id: 'doing', label: 'In progress' },
  { id: 'done', label: 'Done' },
];
const initial: KanbanCard[] = [
  { id: 'quote', label: 'Review supplier quote', columnId: 'ready' },
  { id: 'contract', label: 'Approve contract', columnId: 'ready' },
  { id: 'dates', label: 'Confirm delivery dates', columnId: 'doing' },
];

export default function Example() {
  const [cards, setCards] = useState(initial);
  return <KanbanBoard label="Supplier onboarding" columns={columns} cards={cards} onChange={setCards} />;
}

Read-only incident board

Preview
Triage
  1. Website latency
    INC-102 · Platform
Fixed
  1. Payment timeouts
    INC-99 · Billing
Example.tsx
import { KanbanBoard } from '@reactloom/dnd';

const columns = [
  { id: 'triage', label: 'Triage' },
  { id: 'fixed', label: 'Fixed' },
];
const incidents = [
  { id: 'INC-102', label: 'Website latency', owner: 'Platform', columnId: 'triage' },
  { id: 'INC-99', label: 'Payment timeouts', owner: 'Billing', columnId: 'fixed' },
];

export default function Example() {
  return (
    <KanbanBoard label="Incident snapshot" columns={columns} cards={incidents} onChange={() => {}} disabled
      renderCard={(card) => <><strong>{card.label}</strong><br />{card.id} · {card.owner}</>} />
  );
}

API reference

KanbanBoard props
PropTypeDefault
labelrequired
Names the board.
string—
columnsrequired
Ordered columns with a stable id and accessible label.
readonly KanbanColumn[]—
cardsrequired
Cards with unique id, label, and an existing columnId. Array order determines order inside each column.
readonly T[]—
onChangerequired
Receives the proposed order and column assignments. Update cards to commit the move.
(cards: T[]) => void—
renderCard
Render custom card content while retaining built-in controls.
(card: T) => ReactNode—
disabled
Disable all drag and move controls.
booleanfalse
messages
Translate action labels, empty-column text, and move announcements.
Partial<KanbanMessages>—

Customization

Use className for board-scoped theme variables and renderCard for badges, dates, or other metadata. Use [data-drop-target] to style an active destination.

Accessibility

Each column is a named region. Drop on a card to insert before it, or on a column to append. Completed moves are announced with the new column and position.

Keyboard interactions
KeyAction
TabMove through drag handles, column selectors, and reorder buttons
Enter or Space on a handleStart keyboard drag
Tab or Shift+Tab in drag modeChoose a destination
Enter or Escape in drag modeDrop or cancel

Usage guidelines

Do

  • Persist stable card and column IDs. Apply permission checks before committing moves.

Don’t

  • Avoid duplicate column labels and avoid hiding the only control for changing a card’s stage.