Skip to main content

DraxScrollView

Scrollable container that tracks scroll position for coordinate transformation and supports auto-scroll during drag operations.

Import

import { DraxScrollView } from 'react-native-drax';

Usage

<DraxProvider>
<DraxScrollView style={{ flex: 1 }}>
{items.map((item) => (
<DraxView key={item.id} payload={item}>
<Text>{item.label}</Text>
</DraxView>
))}
</DraxScrollView>
</DraxProvider>

Props

Extends all ScrollViewProps plus:

PropTypeDefaultDescription
idstringauto-generatedDraxView id
autoScrollIntervalLengthnumber200ms between auto-scroll jumps
autoScrollJumpRationumber0.2Jump distance as fraction of container
autoScrollBackThresholdnumber0.1Start back-scroll at this ratio
autoScrollForwardThresholdnumber0.9Start forward-scroll at this ratio