Skip to content
IndexRequest a UIAboutContact

Edge Swipe Back Gesture

Drag from the left edge to pull the page away and reveal the previous one, with a Back button.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Illustration sequence in three frames of a phone screen stack: frame one a Detail page at rest, frame two the Detail page dragged halfway to the right by a thumb starting at the left edge with the previous Home page peeking in from the left slightly dimmed and offset, frame three the Home page fully revealed, thin arrows and a dashed edge zone along the left side, light theme, flat vector style. Negative: gradients, clutter, text errors, real device logos. Reduced motion: static sequence.

About this pattern

Definition

The edge swipe is a navigation gesture: touch near the left edge and drag right, and the current screen follows the finger while the previous screen slides in underneath at a slower pace. If you pass about a third of the width or flick fast, it commits; otherwise it springs back. Every gesture needs a visible button alternative.

Purpose & UX principles

  • Start only when the pointer begins within about 24 pixels of the edge, to avoid conflicts with content swipes.
  • Move the top page one to one with the finger, the lower page at about 30 percent of the distance, and dim it a little.
  • On release, commit if past the threshold or fast, otherwise animate back.
  • Always provide a Back button for keyboard and assistive technology users.

Interaction states

  • Drag from the left edge of the phone frame, or use the Back button; Open detail goes forward again.

Motion specification

  • Release animates over 250ms.
  • Reduced motion: it commits or cancels without animation.

Responsive behaviour

  • Use touch-action to keep the browser from also scrolling or going back.
  • Do not trap people; Escape or the Back button must always work.

Code

HTML
<div class="bx"><div class="ph" id="ph"><section class="pg a" id="pa"><h4>Home</h4><p>Your recent items.</p><button class="mini" id="op" type="button">Open detail →</button></section><section class="pg b" id="pb"><header><button class="mini" id="bk" type="button">← Back</button><b>Detail</b></header><p>Swipe from the left edge to go back.</p><i class="ed"></i></section></div><p class="out" id="out" role="status"></p></div>

Related patterns

Directional Page Slide

↗
Directional Page SlideMotion & Transitions

Rubber Band Drag Resistance

↗
Rubber Band Drag ResistanceGestures & Touch

Bottom Sheet

↗
Bottom SheetGestures & Touch