DraxHandle
Drag handle component. Only touches on this area will start a drag. Must be inside a DraxView with dragHandle={true}.
Import
import { DraxHandle } from 'react-native-drax';
Usage
<DraxView dragHandle style={styles.row}>
<DraxHandle style={styles.grip}>
<GripIcon />
</DraxHandle>
<Text>Item content — taps and scrolls work here</Text>
</DraxView>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | required | Content of the handle |
style | StyleProp<ViewStyle> | — | Style for the handle wrapper |
How It Works
- Parent
DraxViewhasdragHandle={true}— skips attaching gesture to its ownGestureDetector - Parent provides its gesture via
DraxHandleContext DraxHandleconsumes the context and wraps its children withGestureDetector- In the hover layer, renders as a plain
Reanimated.View(no gesture needed)
Related
- Drag Handles Guide
- DraxView —
dragHandleprop