Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda