Installation
Features
- Drag and drop between columns with @dnd-kit
- Virtualized lists for large datasets with @tanstack/react-virtual
- Infinite scroll per column
- Horizontal scroll for unlimited columns
- Integrated filtering and search
- Optimistic updates with automatic rollback on error
- Fractional indexing for scalable ordering
- Customizable card, column, and empty state rendering
- Smart cursor styles (grab/grabbing/pointer)
- Prevent drag on specific elements with
data-no-drag - URL sync for filters and search
Basic Usage
Hook Options
Column Definition
The
value property is used when the column id differs from the actual value stored in your data.
For example, if your column has id: "in-progress" but your database stores status: "DOING",
set value: "DOING". When a card is moved to this column, the hook will use value for optimistic updates.
If value is omitted, the column id is used instead.Card Move Parameters
When a card is moved,onCardMove receives:
insertAfterId pattern is designed for scalability:
- Frontend sends only the reference ID (not the order)
- Backend queries the real neighbors to calculate the correct order
- Works correctly even with filters applied
Backend Integration
Your backend should implement a move endpoint like:Component Props
Toolbar Layouts
Programmatic Card Move
Custom Card Components
The package includes pre-built card components:Custom Empty State
Customize what’s shown when a column has no items:Preventing Drag on Specific Elements
Use thedata-no-drag attribute on elements that should not trigger dragging:
Cursor Styles
TheKanbanCard component automatically handles cursor styles based on state:
| State | Cursor | When |
|---|---|---|
cursor-grab | ✋ | Card is draggable, no onCardClick |
cursor-pointer | 👆 | Card has onCardClick handler |
cursor-grabbing | ✊ | Card is being dragged |
cursor-not-allowed | 🚫 | Card is disabled |
isClickable parameter in renderCard determines if the card should show cursor-pointer: