Home > OS >  Swiper: How to determine the type of event?
Swiper: How to determine the type of event?

Time:12-20

I'm using Swiper for React.

I need to use a different effect if the user swipes and uses buttons to change the active slide.

I looked in the swipe object for information about the event type but couldn't find anything:

<StyledWidgetRecentJoins
  onTransitionEnd={(swiper) => {
    console.log(swiper);
  }}
>
  //
</StyledWidgetRecentJoins>

How to determine the type of event?

CodePudding user response:

The Swiper API documentation gives you the a bunch of useful events you can listen to.

You can choose the ones you listen to. checkout this link for information - https://swiperjs.com/swiper-api#events

  • Related