- X1
Before/after slider — the redesign in one drag
Two designs in one frame, split by a draggable divider — the visitor drags their own proof. The strongest single element you can put on a done-for-you or portfolio page.
PRO demo — drag the divider — arrow keys work too
Before
After
Steal the show.
One hub. Total control.
Join freePaste into Claude Code / eStage builder AIBuild a before/after comparison slider: stack two layers absolutely in one container — the "before" design filling it, and the "after" design on top clipped with clip-path: inset(0 X% 0 0) where X follows a draggable divider. Track dragging with pointerdown/pointermove/pointerup on the container (setPointerCapture so the drag survives leaving the element), converting clientX to a 4-96% position; render a thin divider line with a circular handle at that position. Add accessibility: role="slider" with aria-valuenow, keyboard left/right arrows moving the divider, touch-action: none so touch dragging works. No animation needed — the divider follows the pointer directly.
