Vibary.ai
← Vibe Coding

Swipe Back Peel

An edge drag peels the top page away under your finger and snaps to whichever side the gesture was heading for.

navigationpremiumfriendlyinteraction · finite · advanced · ~0.4s
Interactive · click to play
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

410 lines · react + motion only
import { useState } from "react";
import {
  animate,
  motion,
  useDragControls,
  useMotionValue,
  useReducedMotion,
  useTransform,

About this pattern

Direct manipulation, which raises the bar: the page has to sit exactly under the finger, so the drag has no elasticity, no momentum and no lag, and everything expressive is saved for the release. One motion value carries the whole gesture — the drag writes to it, the release animates it, and the page behind reads from it — which is why a finger and a spring can hand off mid-flight without a seam, and why you can see how far back you would land before committing. On release either measure can win: a long slow drag past a third of the width, or a short fast flick. Requiring both is what makes a swipe-back feel sticky. The gesture starts only from a thumb-wide edge strip, because a page-wide drag listener fights every scroll and tap on the screen.

Gesture back navigationReader and article screensDetail screen dismissalMobile web app shell

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • 10:15
    Home
    Contract renewalPriya Raman · 10:14
    Q3 hiring planMarcus Bell · 09:02
    Venue confirmedDana Whitfield · Tue
    Invoice 4821 clearedBilling · Tue
    HomeSearchActivityProfile
    Mobile navigation

    An edge drag pulls the previous page in behind the current one.

Related patterns