# Swipe list - differentiate between swipe and drag

**URL:** <https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181>\
**Category:** ionic-v3\
**Created:** [July 30, 2017, 6:35pm UTC](https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181 "2017-07-30T18:35:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aavelyn](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@aavelyn](https://forum.ionicframework.com/u/aavelyn)\
**Post date:** [July 30, 2017, 6:35pm UTC](https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181/1 "2017-07-30T18:35:32Z")

</div>

I’m using the ion-item-sliding for todos and I want the item to execute a method (like delete) only for a swipe gesture while the user still can drag the item. Thus if the user starts to swipe but doesn’t let go it will count as a drag action.

so far the ionSwipe has a \_openAmount property which lets me set a value before the task is checked off.

```auto
	checkOff(task: Task, event) {
		if (event._openAmount > 70) {
		    task.isOpen = false
		}
	}

```

I’m using ngClass to let the item translateX out of the screen

this however is not user friendly since the user has to swipe a distance of 70px and any swipe/drag longer than 70px will trigger the ngClass.

Is there a way to distinguish between a drag and swipe?

Thanks

---

<div class="post-metadata">

**Author:** ![AmanJojra](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AmanJojra](https://forum.ionicframework.com/u/AmanJojra)\
**Post date:** [July 31, 2017, 2:10am UTC](https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181/2 "2017-07-31T02:10:12Z")

</div>

Did you check here?

> **[Ionic Framework](https://ionicframework.com/docs/components/#gestures)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

Best way swipes were used in apps, is to show buttons to trigger action after swipes.

---

<div class="post-metadata">

**Author:** ![aavelyn](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@aavelyn](https://forum.ionicframework.com/u/aavelyn)\
**Post date:** [July 31, 2017, 8:10am UTC](https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181/3 "2017-07-31T08:10:17Z")

</div>

thanks for the reply and ux suggestion. Is there a reference why it is better? Most Todolist apps like wunderlist oder todoist or even emal use the single swipe to trigger an action, which is i guess one action less than swipe then click.

Cheers

---

<div class="post-metadata">

**Author:** ![AmanJojra](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AmanJojra](https://forum.ionicframework.com/u/AmanJojra)\
**Post date:** [August 1, 2017, 5:32am UTC](https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181/4 "2017-08-01T05:32:39Z")

</div>

I am glad I was helpful. I read nice article on contextual swipe [here.](https://www.nngroup.com/articles/contextual-swipe/)

I personally think swipe action without button (with contextual text) is a bit confusing because I am not aware what its gonna do. I like to use it for pull to refresh though.

---

<div class="post-metadata">

**Author:** ![aavelyn](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@aavelyn](https://forum.ionicframework.com/u/aavelyn)\
**Post date:** [August 1, 2017, 2:49pm UTC](https://forum.ionicframework.com/t/swipe-list-differentiate-between-swipe-and-drag/100181/5 "2017-08-01T14:49:53Z")

</div>

Thanks for the reference! I will however only implement the delete swipe and use a toast for confirmation. This will be consistent enough i guess. If I was to implement more contextual actions buttons, i’d slide to reveal for sure.

Cheers
