Kinetic physics and swipe gestures
The lock screen on iOS slides up. Rauno Freiberg reads that as a lesson: the lock screen is just an overlay dismissed by swiping up, and within that framing so is an app. In Invisible Details of Interaction Design he watches an app dismissed into the Dynamic Island. The gesture retains the momentum and angle at which it was thrown, never perfectly centred or consistent in timing.
A card, not a simulation#
His comparison is a playing card swiped across a table, with limits: a real card would bounce less, being conceptually lighter, and does not magnetically morph into something at the end. The interface is not simulating a card; it borrows enough of the card’s behaviour that your hand already knows what to expect.
Lightweight actions fire mid-swipe#
When does a swipe trigger an action? The naive model is press, move, release, then act. After building touch interactions in SwiftUI, Rauno realised that lightweight actions, such as displaying overlays or opening search, feel more natural triggered during the swipe after an arbitrary distance.
His SwiftUI prototype of Jason Yuan’s MercuryOS unlocks the moment the titles snap into place: “It feels expected to trigger an action when elements moving during the gesture reach their logical, final position.” Waiting for the gesture to end would feel broken and give less affordance.
Destructive actions wait for release#
The iOS App Switcher will never dismiss an app before the gesture ends, however far you have dragged. Dismissing is destructive, and it would not feel nice to vanish halfway through a swipe: change your mind, cross the threshold by accident, lose progress. Triggering on gesture end, regardless of distance, makes the interface respond to what you meant.
The same rule buys you peeking: nothing commits until you let go, so you can drag another screen into view while scanning for an app, and interrupt by changing direction. In Figure 1, drag the card past the dashed line in each mode and watch when the action fires; then cross the line and drag back before letting go.
Momentum as a third trigger#
Distance is not the only signal. Emil Kowalski’s Sonner toast, described in Building a Toast Component, is momentum-based: a fast swipe dismisses even when the distance is short. He divides the absolute drag distance by the elapsed time to get a velocity and removes the toast if either clears its limit. The velocity limit, 0.11, came from trial and error.
const timeTaken = new Date().getTime() - dragStartTime.current.getTime();const velocity = Math.abs(swipeAmount) / timeTaken;// 0.11 is just a number that I ended up on through trial and errorif (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) { removeToast(toast);}Trigger timing is a decision, and the right answer depends on the cost of being wrong. Cheap to undo: respond as soon as the moving elements reach their final position. Expensive: keep the gesture reversible and commit on release. Either way, let the thing you drag keep the momentum and angle you gave it; a gesture that lands identically every time stops feeling like yours.