poetic:react-swipe-x

v0.0.4Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Swipe element left or right for an action.

Use

<SwipeX leftAllowed={true} background={<DraggableBg/>} eventCallback={restaurantCallback} threshold={10} eventThreshold={0.25}>
</SwipeX>

Threshold is a pixel value, event threshold is a decimal representing a percent of the element's width. Both have defaults.

leftAllowed represents the direction of swipe allowed. Passing rightAllowed={true} for only right swiping. If neither is passed in then moving from both directions will be allowed.