Skip to content

Gesture

@xngui/cdk/gesture
@xngui/cdk/gesture

Pointer swipe recognition on a host element.

Preview

Swipe horizontally

Last swipe

No swipe yet — use touch or a pointer drag.

import { XSwipeGesture } from '@xngui/cdk/gesture';
 
<div
xSwipeGesture
[xSwipeGestureAxis]="'horizontal'"
[xSwipeGestureThreshold]="48"
(xSwipeGesture)="onSwipe($event)"
>
Swipe me
<div>

Events

Interact with the preview — events will appear here.