Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
How to use Swiper library to implement swipe to dismiss

I have a vertical list of messages and I want to implement swipe to dismiss, just like how Gmail does it where you swipe left to right and when you release, it deletes the message, but I also want it to fade progressively as you swipe. I don't think Swiper is truly built for this usecase but I feel like it should be doable with the exposed APIs. Currently, my component is structured like so:

// component.vue
<div v-for="message in messages"></div>
  <swiper @slideChange="foo">
    <swiper-slide>
      <message :message="message"></message>
    </swiper-slide>
  </swiper>
<div>

So each message is rendered within a swiper instance, essentially a carousel with 1 item. How would I go about doing this? I think we need to fire an event on swipe to start the fade effect, and another event on touchEnd and check how far the message was slided, and if it is past a certain threshold, apply an animation to make slide all the way off the screen.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!