Skip to main content

Cross-List Reorder Experimental

Demonstrates cross-container drag — moving items between FlashList, LegendList, and FlatList columns. This showcases Drax's list-agnostic API: the same useSortableList + SortableContainer + SortableItem composable pattern works with any list component.

Key Concepts

  • useSortableBoard — board-level coordinator
  • SortableBoardContainer — monitoring wrapper for the board
  • List agnostic — each column uses a different list component (FlashList, LegendList, FlatList)
  • Phantom slots — target column reserves space for incoming item
  • Smooth transfers — hover covers the transition between columns

Features Shown

FeatureHow
useSortableBoardBoard-level coordinator with onTransfer
SortableBoardContainerWraps all columns, detects cross-boundary drags
Per-column useSortableListEach column manages its own reorder state
Cross-container transferItems move between columns on drop
FlashList integrationHorizontal column powered by @shopify/flash-list
LegendList integrationVertical column powered by @legendapp/list
FlatList integrationVertical column using React Native's built-in FlatList
Drop indicatorsBlue accent line shows insertion point

Source Code

▶️ Live demo · 💻 Source