@tomaszatoo/ngx-swipe
v0.0.3
Published
Lightweight Angular component to detect swipe gestures with optional axis locking and smooth animations. Works on mouse & touch.
Maintainers
Readme
@tomaszatoo/ngx-swipe
Lightweight Angular component to detect swipe gestures (left, right, top, bottom) with optional axis locking (x, y, both) and smooth animations. Works on mouse & touch.
Install
npm i @tomaszatoo/ngx-swipeUsage
<swipe [axis]="axis" (swiped)="onSwipe($event)">
<h3>Swipe me!</h3>
</swipe>axis: 'x' | 'y' | 'both' = 'both';
onSwipe(e: { direction: 'left'|'right'|'top'|'bottom' }) {
console.log(e.direction);
}Contributing
git clone https://codeberg.org/tomaszatoo/ngx-swipe
cd ngx-swipe
npm install
# make changes
npm run build
# test locally or run demo
# then commit & create PRExample
You can find an example of how to use this component here.
Licence
MIT Copyright © 2025 Tomas Zato
