Skip to main content

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

PropTypeDefaultDescription
childrenReactNoderequiredContent of the handle
styleStyleProp<ViewStyle>Style for the handle wrapper

How It Works

  1. Parent DraxView has dragHandle={true} — skips attaching gesture to its own GestureDetector
  2. Parent provides its gesture via DraxHandleContext
  3. DraxHandle consumes the context and wraps its children with GestureDetector
  4. In the hover layer, renders as a plain Reanimated.View (no gesture needed)