I just open-sourced ComposePinchGrid — a Google Photos-style pinch-to-resize grid for Compose Multiplatform.
— Adit Lal (@aditlal) March 17, 2026
Pinch to change columns, haptic on snap, breathing scale animation. Works on Android, iOS, Desktop & Web.
3 lines of code. Zero Material dependency.… pic.twitter.com/VxjDhL7bFZ
The hard part wasn't the grid - it was the gesture.
— Adit Lal (@aditlal) March 17, 2026
transformable() fights with LazyVerticalGrid scroll. Both grab the same pointer events.
Solution: raw pointerInput with PointerEventPass.Initial — intercepts 2-finger pinch BEFORE the grid's scroll handler. Single-finger…
What you get:
— Adit Lal (@aditlal) March 17, 2026
- Asymmetric thresholds (pinch-out is naturally weaker - we compensate)
- Dead zone filtering (no jitter from finger tremors)
- Breathing scale animation (graphicsLayer = zero recompositions)
- Platform haptics (Android CLOCK_TICK, iOS UISelectionFeedbackGenerator)…
Docs: https://t.co/qKpVqH2F63
— Adit Lal (@aditlal) March 17, 2026
GitHub: https://t.co/1EEkeUDVt0
KMP from day one. Android, iOS, Desktop, Wasm. Apache 2.0.
