Build a touch-driven image carousel that responds to left and right swipe gestures on mobile devices.
Add pinch-to-zoom functionality to a photo viewer in a web app.
Create a drag-and-drop interface that works correctly on both mouse and touchscreen devices.
Define a custom triple-tap gesture to trigger a hidden action in your web app.
| hammerjs/hammer.js | vercel/pkg | winstonjs/winston | |
|---|---|---|---|
| Stars | 24,359 | 24,379 | 24,437 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Hammer.js is a JavaScript library that makes it easy to detect touch and gesture interactions on web pages. Normally, tracking gestures like swipes, taps, pinches, or presses involves writing complicated low-level code to interpret raw touch events from the browser. Hammer.js handles all that complexity so you can simply say "when the user swipes left, do this" without worrying about the underlying mechanics. It works by attaching a listener to any HTML element on your page. You then subscribe to named gesture events, tap, double tap, press, swipe, and so on, and provide a function to run when that gesture is detected. For custom gestures not included by default, you can define your own recognizers with specific rules (for example, a triple tap). You would use this when building a web app that needs to feel native on mobile devices: touch-driven carousels, drag-and-drop interfaces, pinch-to-zoom image viewers, or any interactive experience where mouse clicks aren't enough. It is a pure JavaScript library with no framework dependency, so it works with any web project.
Hammer.js is a JavaScript library that detects touch gestures like swipes, taps, pinches, and presses on web pages, so you can build mobile-friendly interactions without writing complex low-level code.
Mainly JavaScript. The stack also includes JavaScript.
License not mentioned in the explanation.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.