# Kinetic physics and swipe gestures · Invisible details

<!-- https://learn-ui.com/chapters/invisible-details/kinetic-physics -->

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](https://rauno.me/craft/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.

Source

Both rules are from the Swipe Gestures section of the essay. The MercuryOS prototype is his SwiftUI recreation of Jason Yuan’s 2019 concept.

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.

> Figure 1. When a swipe should commit. Drag the card past the dashed line in each mode and notice when the action fires. A lightweight action like showing an overlay can trigger during the swipe, once you have moved far enough. A destructive action like dismissing waits for release, so the interface responds to intent rather than distance.Illustrative numbers

### Momentum as a third trigger

Distance is not the only signal. Emil Kowalski’s Sonner toast, described in [Building a Toast Component](https://emilkowal.ski/ui/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.

> Figure. TypeScriptEmil Kowalski, Building a Toast Component

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.
