react-native-drax
Drag‑and‑drop for React Native. Done right.
Sortable lists, grids, cross-container drag, drag handles, collision algorithms, and more. Built on Reanimated 4 with a UI-thread-first architecture for smooth 60fps interactions on iOS, Android, and Web.
- iOS
- Android
- Web
Works with FlatList · FlashList · LegendList · or any list component
npm install react-native-draxList-Agnostic Sortable
Works with FlatList, FlashList, LegendList, or any list component. One API, any renderer.
Cross-Container Drag
Move items between lists — works with FlashList, LegendList, FlatList. Phantom slots, auto-scroll, and smooth transfers.
UI-Thread Performance
Spatial index worklet runs hit-testing on the UI thread. SharedValues split by update frequency for 60fps.
19 Callback Events
Full drag lifecycle control: drag start, enter, over, exit, end, drop, snap, monitor — and continuous callbacks.
Three Platforms
iOS, Android, and Web. New Architecture (Fabric) compatible. Built on Reanimated 4 + Gesture Handler 3.
Composable Architecture
Use DraxList for convenience, or compose useSortableList + SortableContainer + SortableItem for full control.
Three lines to drag. Five to sort.
- Basic Drag & Drop
- Sortable List
- Composable API
import { DraxProvider, DraxView } from 'react-native-drax';
function App() {
return (
<DraxProvider>
<DraxView
style={{ width: 100, height: 100, backgroundColor: 'blue' }}
onDragStart={() => console.log('dragging')}
payload="hello"
/>
<DraxView
style={{ width: 100, height: 100, backgroundColor: 'green' }}
onReceiveDragDrop={({ dragged: { payload } }) => {
console.log(`received: ${payload}`);
}}
/>
</DraxProvider>
);
}
import { useState } from 'react';
import { Text, View } from 'react-native';
import { DraxProvider, DraxList } from 'react-native-drax';
function App() {
const [items, setItems] = useState(['A', 'B', 'C', 'D', 'E']);
return (
<DraxProvider>
<DraxList
data={items}
keyExtractor={(item) => item}
onReorder={({ data }) => setItems(data)}
renderItem={({ item }) => (
<View style={{ padding: 16, backgroundColor: '#eee', margin: 4 }}>
<Text>{item}</Text>
</View>
)}
/>
</DraxProvider>
);
}
import {
DraxProvider, useSortableList,
SortableContainer, SortableItem,
} from 'react-native-drax';
import { FlatList, Text } from 'react-native';
function App() {
const [items, setItems] = useState(['A', 'B', 'C', 'D', 'E']);
const listRef = useRef<FlatList>(null);
const sortable = useSortableList({
data: items,
keyExtractor: (item) => item,
onReorder: ({ data }) => setItems(data),
});
return (
<DraxProvider>
<SortableContainer sortable={sortable} scrollRef={listRef}>
<FlatList
ref={listRef}
data={sortable.data}
keyExtractor={sortable.stableKeyExtractor}
onScroll={sortable.onScroll}
onContentSizeChange={sortable.onContentSizeChange}
renderItem={({ item, index }) => (
<SortableItem sortable={sortable} index={index}>
<Text>{item}</Text>
</SortableItem>
)}
/>
</SortableContainer>
</DraxProvider>
);
}
Choose your library #
This comparison was researched with the help of AI and may contain inaccuracies. If you spot an error, please open an issue.
| Feature | Drax | reanimated-dnd | sortables |
|---|---|---|---|
| Free-form drag & drop | Yes | Yes | No |
| Sortable list | Yes | Yes | Yes |
| Sortable grid | Yes | Yes | Yes |
| Sortable flex layout | No | No | Yes |
| Horizontal sorting | Yes | Yes | Yes |
| List-agnostic (FlatList, FlashList, LegendList) | Yes | No | No |
| Cross-container / cross-list reorder | ⚠️ Experimental | No | No |
| Fixed-order items | Yes | No | 3 modes |
| Drag handles | Yes | Yes | Yes |
| Drag axis locking | Yes | Yes | Partial |
| Drag bounds | Yes | Yes | Container only |
| Auto-scrolling | Yes | Yes | Yes |
| Haptic feedback | No | No | Yes |
| Drag state styling | 15 props + inactive | onStateChange | 5 props + hook |
| Reorder animation presets | 5 presets + custom | No | No |
| Drop animation | Custom fn() | Custom fn() | Duration only |
| Item removal animation | Yes | Grid only | Yes |
| Drop indicator | Yes | No | Grid only |
| Dynamic item heights | Yes | Yes | Yes |
| Collision algorithms | 3 modes | 3 modes | No |
| Snap alignment | 9-point + custom | 9-point | No |
| Drop zone acceptance | Callback + capacity | Capacity only | No |
| Monitoring views | Yes | No | No |
| UI-thread DnD collision | Yes | No | No |
| Event callbacks | 19 types | ~12 types | ~10 types |
| Continuous drag callbacks | 4 types | 1 type | 1 type |
| Provider-level callbacks | Yes | Yes | No |
| Accessibility | Yes | Manual | Manual |
| Reduced motion | Yes | No | No |
| AI agent skills | No | Yes | No |
| Web support | Yes | No | Partial |
| Reanimated | 4 | ≥ 4.2 | ≥ 3 |
| Gesture Handler | 3 (beta) | ≥ 2.28 | ≥ 2 |