I have multiple tabs for users to switch between. For mobile users ideally they could swipe left/right and see the information on each tab. How can I do this in an aura page? I tried it a variety of ways but aura seems to only support regular clicks.


Ok, ended up finding the answer, I used ontouchmove for detecting swipe events, event returns a touch object in an event.touches array


 <div  ontouchmove="{!c.touchmove}"><!--start touchcontainer-->

touchmove: function(component, event, helper) {     
         if(!event.touches || event.touches.length == 0)return;
         var xmoved =  event.touches[0].clientX
        //do stuff
| improve this answer | |
  • Can you provide the sample code here as how were you able to achieve this? This will be helpful for others in similar situation. – Jayant Das Nov 14 '19 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.