Swiper JS: Adding Two finger swipe on Vertical Swiper

467 Views Asked by At

I'm looking out for a way to add two finger swipe on Vertical Swiper.

I tried getting object from swiper.touches object, but it didn't help me returning length of fingers used while swiping like give in Docs.

https://developer.mozilla.org/en-US/docs/Web/API/TouchList/length

Any other approach to do this is also welcomed.

Thanks in advance!

1

There are 1 best solutions below

1
Hyenabyte On

If you activate the mousewheel plugin, Swiper will accept sideways scrolling including two-finger scroll

const swiper = new Swiper('.swiper', {
  mousewheel: true
});

https://swiperjs.com/swiper-api#mousewheel-control