Kanban Pro
A board of columns and cards, as Trello, Linear and Jira draw it. Drag a card to another column or place: it lifts once the pointer moves a few points, so a tap still opens it, a placeholder shows where it will land, and the board scrolls sideways near its edges. On phones, where a swipe across the cards should scroll the board, dragDelay={250} makes a card wait for a long press instead. Dragging isn't the only way: each card has a Move to… menu, screen readers get Move up, down, left and right actions, and on the web Shift + arrow keys move the focused card. Every move is announced. All in React Native's own PanResponder, so it runs in Expo Go and the browser.
import { Kanban } from '@patine-ui/pro';
<Kanban columns={columns} cards={cards} onCardsChange={setCards} onAddCard={(column) => alert(`Add to ${column}`)} style={{ width: '100%' }} />
Try the props
dragDelaycolumnWidthdensitydesign<Kanban
columns={columns}
cards={cards}
onCardsChange={setCards}
/>
Example: a hiring pipeline
A recruiter's board: candidates move stage by stage, never skipping one, Offer holds at most two at a time, and each move is logged where a real app would save it.
<View style={{ width: '100%', gap: 8 }}> <Kanban columns={STAGES} cards={cards} onCardsChange={setCards} canMove={(card, to) => Math.abs(ORDER.indexOf(to) - ORDER.indexOf(card.columnId)) <= 1} onCardMove={({ card, to }) => setLog(`${card.title} → ${STAGES.find((s) => s.id === to.columnId)?.title}`)} /> <Text size="sm" color="textSecondary">{log}</Text> </View>
Cards and columns
A column is { id, title, color?, limit? }; with a limit its count reads "3 of 3", amber when full and red past it. A card is { id, columnId, title, description?, tags?, assignees?, dueDate?, priority?, cover?, locked?, data? }. The order of cards is the order down each column. Due dates turn amber today and soon, red when overdue; priority shows a flag ('low', 'medium', 'high', 'urgent').
Moves
onCardsChange(cards, move) gets the new order after each user move: set it as cards, or use defaultCards and let the board keep its own. onCardMove(move) is the place to save: { card, from: { columnId, index }, to: { columnId, index } }. canMove(card, toColumnId) refuses moves, such as into Done straight from To do; a locked card stays put.
<View style={{ gap: 12 }}> <Kanban columns={columns} cards={cards} onCardsChange={setCards} canMove={(card, to) => !(card.columnId === 'new' && to === 'shipped')} onCardMove={({ card, to }) => setLog(`${card.title} → ${to.columnId}, position ${to.index + 1}`)} columnWidth={240} density="compact" style={{ width: '100%' }} /> <Text>{log}</Text> </View>
Your own cards
renderCard({ card, index, column, dragging, theme }) draws a card's face; the board keeps its press, drag and menu. renderColumnHeader and renderEmptyColumn do the same for headers and empty columns. Put your own fields in data.
<Kanban columns={columns} defaultCards={deals} showMoveMenu={false} renderCard={({ card }) => ( <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}> <Text weight="medium">{card.title}</Text> <Text color="success" weight="semibold">${card.data.amount.toLocaleString()}</Text> </View> )} style={{ width: 600 }} />
Accessibility
Each card is read with its column, due date and priority, and hints that it can be held to drag. Dragging needs a finger or mouse, so every move it can make is also in the card's Move to… menu (a 44-point target in its corner) and in screen-reader actions; on the web, Shift + arrow keys move the focused card between columns and up and down. Moves are announced: "Moved to In review, position 1 of 2".
Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns | KanbanColumn[] | — | { id, title, color?, limit? } |
cards / defaultCards | KanbanCard[] | [] | { id, columnId, title, description?, tags?, assignees?, dueDate?, priority?, cover?, locked?, data? } |
onCardsChange | (cards, move) => void | — | Every user move, with the new order. |
onCardMove | (move) => void | — | |
canMove | (card, toColumnId) => boolean | always | |
onCardPress | (card) => void | — | |
onAddCard | (columnId) => void | — | Shows + on each column. |
draggable | boolean | true | Cards can be dragged. |
dragDelay | number | 0 | How long a card is held before it drags, in ms. With 0 it drags once the pointer moves a few points; set e.g. 250 so a swipe on a phone scrolls the board |
showMoveMenu | boolean | true | |
columnWidth | number | 280 | |
now / locale | For due dates. | ||
renderCard / renderColumnHeader / renderEmptyColumn | |||
loading / error / onRetry / emptyTitle / renderEmpty | States. | ||
density / labels / design / theme / accessibilityLabel / style |