Skip to main content
Live Demo

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:
The 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:
If not provided, defaults to a simple “No items” message.

Preventing Drag on Specific Elements

Use the data-no-drag attribute on elements that should not trigger dragging:
This is useful for interactive elements inside cards like buttons, inputs, or dropdown menus.

Cursor Styles

The KanbanCard component automatically handles cursor styles based on state: The isClickable parameter in renderCard determines if the card should show cursor-pointer:

Horizontal Scroll

The board automatically supports horizontal scrolling when you have many columns. Each column has a fixed width (320px) and the container scrolls horizontally when columns exceed the viewport. This works out of the box - no configuration needed.

Full Height Layout

To make the kanban fill the viewport height: