Pointer input in Compose

Compose provides a variety of APIs to help you detect gestures that are generated from user interactions. The APIs cover a wide range of use cases:

  • Some of them are high-level and designed to cover the most commonly used gestures. For example, the clickable modifier allows easy detection of a click, and it also provides accessibility features and displays visual indicators when tapped (such as ripples).

  • There are also less commonly used gesture detectors that offer more flexibility on a lower level, like PointerInputScope.detectTapGestures or PointerInputScope.detectDragGestures but don't include the extra features.

Learn more about pointer input on the following pages:

  • Understand gestures gives an explanation of the core concepts playing a role when handling pointer input.
  • Tap and press expands on single pointer, single position events.
  • Scroll explains how to implement scrolling containers, and handles interoperability concerns.
  • Drag, swipe, and fling shows different types of dragging of a single pointer.
  • Multi-touch dives into situations where more than one pointer is used.