← Library

Essay

Drag Gestures on the Web

Jakub Krehel

Drag is far less common on the web than on mobile. An iOS-inspired gesture built with Motion, as an exercise in how it should feel.

Motion

Summary

Drag is common on mobile and rare on the web, so Jakub built an iOS 26 inspired swipe-to-action row with Motion as an exercise in how one should actually feel. The structure is simple, an outer container with overflow-clip and an inner row that carries the gesture. The detail is in the configuration: a motion value for x, constraints for the snap points, a low dragElastic so it resists at the edges, and momentum switched off. Each setting is exposed as a live toggle so you can feel what it does rather than read about it.

View full writing
Read the full essay on jakub.kr
Source ↗Jakub Krehel ↗

Goes well with

  • emil-design-eng

    The design-engineering house style behind Sonner and Vaul.

    Emil KowalskiMotionCraft

    Emil's main skill. Mostly animation, with the UI-polish and component judgement that surrounds it: what to build, how far to push it, and when to stop.

    npx skills add https://github.com/emilkowalski/skills

  • animate

    Builds an animation from scratch, decisions in the order that matters.

    Emil KowalskiMotion

    Should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Then writes the implementation.

    npx skills add https://github.com/emilkowalski/skills --skill animate

  • review-animations

    Reviews your motion strictly, against Emil's rules.

    Emil KowalskiMotionReview

    A production-critical pass over animation quality, timing and consistency in a diff. Pairs with improve-animations, which does the same for a whole codebase.

    npx skills add https://github.com/emilkowalski/skills --skill review-animations

Work with us