-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swipe getures? #71
Comments
Hey @skrichten, good question thank you! Actually it’s pretty easy to handle swipes in all directions from the So horizontal swipes could be handled like so: useGesture({
onDrag: ({ vxvy: [vx], last }) => {
if(last && vx < 0.3) {
// swipeLeft
}
else if (last && vx > 0.3) {
// swipeRight
}
}
)} I've made a small carousel utility that uses swipe, you can see the related bit of code here. I'll add a codesandbox example for swipe though, it is indeed an important feature. |
Cool, thanks for the examples! |
For reference, here is a working example that was added to the readme: https://codesandbox.io/s/crimson-dawn-pzf9t |
Curious, why are there are no handlers for basic swipe gestures?
The text was updated successfully, but these errors were encountered: