Genesis
@stable

KanbanBoard

Columns of cards, optionally movable between columns. Moving uses the same engine as SortableList: native drag and drop for the mouse, pointer events on the handle for touch, a keyboard pick-up on the handle, and a "Move to…" menu, with every finished move announced in a polite live region. Radix has no drag and drop and native drag and drop can't be done from a keyboard or a touch screen (docs/FRAMEWORK.md rule 3), so dragging is never the only way to move a card.

packages/ui/src/components/data/KanbanBoard.tsx

Import
Subpath export: @marktiderman/genesis-ui/data
import { KanbanBoard } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

KanbanBoard

Columns of cards, optionally movable between columns. Moving uses the same engine as SortableList: native drag and drop for the mouse, pointer events on the handle for touch, a keyboard pick-up on the handle, and a "Move to…" menu, with every finished move announced in a polite live region. Radix has no drag and drop and native drag and drop can't be done from a keyboard or a touch screen (docs/FRAMEWORK.md rule 3), so dragging is never the only way to move a card.

PropTypeDefaultDescription
columns*KanbanColumn<T>[]—
renderCard*(item: T) => ReactNode—
canMoveItem((item: T) => boolean)—Whether this item can be moved at all (not, say, a row the viewer can't change). Without it, every item can be. A card that can't has no handle or menu and can't be dragged. A move that should wait (one still saving) is better refused from `onMoveItem`: hiding the handle under keyboard focus would drop the focus.
classNamestring—
emptyMessagestring—
getItemLabel((item: T) => string)—A name for an item, for its handle, menu and announcements ("Move Ana Ruiz").
getKey((item: T) => string)—A stable key per item. Without one, cards are keyed by position.
onMoveItem((item: T, toColumn: string) => void | Promise<void>)—Move an item to another column. When set (with `getKey`), every card can be moved four ways: dragged with a mouse; dragged by its handle on a touch screen; picked up from the keyboard with its handle (Space, then ←/→ to choose a column, Space to drop, Escape to cancel; Alt+←/→ moves straight away); or from its "Move to…" menu. A finished move is announced to screen readers. A rejected promise leaves the card where it was and announces that the move failed.
renderColumnFooter((column: KanbanColumn<T>) => ReactNode)—Under a column's cards, e.g. a "Load more" button.