# Gestures & Touch Interaction

> Handle taps, swipes, drags, pinches and long presses with gesture systems that feel native and cooperate with scrolling. Free notes, key concepts, resources...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/gestures
Last updated: 2026-11-28

Handle taps, swipes, drags, pinches and long presses with gesture systems that feel native and cooperate with scrolling.

Intermediate · about 5 hours · difficulty 3/5

Learn first: [Animations & Transitions](https://www.internhack.in/roadmaps/tracks/mobile/animations)

Touch is the primary input on mobile, and users expect gestures to behave exactly like the system apps: swipe back, pull to refresh, swipe a row to delete, pinch to zoom.

### Gesture building blocks

- **Tap, double tap, long press:** discrete gestures that fire once.
- **Pan (drag), pinch, rotate:** continuous gestures that report position, velocity and scale over time.
- **Fling:** a pan that ends with velocity; use that velocity to continue motion with a decay or spring animation.

### Composing gestures

The hard part is deciding which gesture wins. A horizontal swipe on a list row competes with the vertical scroll of the list and the edge swipe of the navigator. Gesture systems let you declare **simultaneous**, **exclusive** or **required-to-fail** relationships and activation thresholds (for example, only start a horizontal pan after 10 px of horizontal movement).

### Tools by stack

- **React Native:** **react-native-gesture-handler** with the `Gesture.Pan()`, `Gesture.Pinch()` API and `GestureDetector`, paired with Reanimated so updates run on the UI thread. `Pressable` covers simple presses.
- **Flutter:** `GestureDetector`, `Dismissible`, `Draggable` and `InteractiveViewer` for zoom and pan.
- **Compose:** `Modifier.clickable`, `draggable`, `transformable` and `pointerInput { detectDragGestures { } }`.
- **SwiftUI:** `DragGesture`, `MagnifyGesture`, `LongPressGesture` combined with `.simultaneously(with:)` or `.exclusively(before:)`.

### Feel details

- Touch targets of at least 44 pt (iOS) or 48 dp (Android).
- Visual feedback within 100 ms of a touch (ripple, highlight, scale).
- Light **haptics** on meaningful moments like a successful swipe action.
- Always offer a non-gesture alternative (a button or menu) for accessibility.

**Good enough to move on:** you can build a swipe-to-delete row that does not fight the list scroll and snaps back naturally when released early.

## Key concepts

- **Discrete vs continuous gestures**
- **Gesture Handler and GestureDetector**: React Native
- **Gesture conflicts with scrolling**
- **Velocity and fling physics**
- **Pinch to zoom**
- **Touch target sizes**
- **Haptic feedback**

## Mini project

Build an inbox list with swipe-left to archive, swipe-right to mark read, long press for a context menu, and a pinch-to-zoom image viewer on the detail screen.

## Check yourself

A horizontal swipe on your list row keeps triggering the list scroll instead. What gesture configuration would you change?

## Free resources

- [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/) (Software Mansion)
- [Flutter: Taps, drags and other gestures](https://docs.flutter.dev/ui/interactivity/gestures) (Flutter)
- [Compose: Gestures](https://developer.android.com/develop/ui/compose/touch-input/pointer-input) (Android Developers)

Previous: [Animations & Transitions](https://www.internhack.in/roadmaps/tracks/mobile/animations) · Next: [Performance & Profiling](https://www.internhack.in/roadmaps/tracks/mobile/performance-profiling)

## More in Animations, Gestures & Performance

- [Animations & Transitions](https://www.internhack.in/roadmaps/tracks/mobile/animations)
- [Gestures & Touch Interaction](https://www.internhack.in/roadmaps/tracks/mobile/gestures)
- [Performance & Profiling](https://www.internhack.in/roadmaps/tracks/mobile/performance-profiling)
- [Startup Time & App Size](https://www.internhack.in/roadmaps/tracks/mobile/startup-and-app-size)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
