loading code fetching the highlighted snippet
A three-column kanban board. Drag a card sideways into another column and it joins that column mid-gesture: the cards there spring apart to make room, and the drag carries on so you can still pick its slot.
Reorder.Board wraps ordinary Reorder.Groups and renders no
element. When a card's centre crosses into another column, the column it left calls onReorder without it and the column it joins calls onReorder with it.$state record, and each column writes
only its own key, so the two onReorder calls never overwrite each other.
Card titles are unique across the board.The Doing column holds at most three cards. Once it is full, a card dragged over it stays in its own column — canMove refuses the move before either column changes.
canMove(card, from, to) runs before either column's onReorder. Here it compares to with the Doing column's array
and refuses once that column holds three cards.canMove runs every frame while a card hovers a full column, so keep it a
cheap check with no side effects. Escape ignores it and always restores the grab.