Skip to main content

Reorderable List

Demonstrates a sortable list using DraxList — the simplest way to add drag-to-reorder.

Key Concepts

  • DraxList — wraps FlatList with full reorder support
  • Long-press to drag — 250ms default delay
  • Auto-scroll — scrolls when dragging near edges
  • Animation presets — items shift with smooth animations

Features Shown

FeatureHow
DraxListConvenience wrapper with data, keyExtractor, onReorder
animationConfigAnimation preset for shift animations
onReorderCallback with new data order
lockToMainAxisItems stay on the vertical axis during drag

Source Code

example/app/(tabs)/reorderable-list.tsx
// Full source available at:
// https://github.com/nuclearpasta/react-native-drax/blob/main/example/app/(tabs)/reorderable-list.tsx