shipped · 2024
JetDraggableIndicators
Instagram-style long-press & draggable carousel indicators for Jetpack Compose.
- Kotlin
- Jetpack Compose
- Animation
What it is
A small Jetpack Compose component that brings Instagram's long-press-to-expand, drag-to-scrub carousel indicator pattern to your own carousel UI. The library version of the technique I wrote up on ProAndroidDev.
Highlights
- Long-press to expand. Indicators grow into a wider scrub bar on press-and-hold.
- Drag to seek. Releasing snaps to the closest item; live preview during the drag.
- Slot-based. Bring your own indicator dot composable — dots, lines, custom shapes.
- Compose-native gestures. No interop, no Views — pure pointer-input gesture handling.
Pulled out of a side project so other people don't have to reinvent the same tricky gesture math.
role · Author← back to projects