Skip to content
WunderUI
All effectsCard

Before / After

Drag a handle across two images to compare before and after.

Pure CSSCardPro

Meant for

CardCarouselWidget

Usage

On a Card

Drag across the image, or tab to the handle and use the arrow keys. One layer clipped over another, with a handle at the cut. The cut is one number, --wm-pos: clip-path moves the cut and transform moves the handle, so nothing is re-laid out and it stays smooth even over a photograph. While the pointer holds it, the cut sits exactly under it; a key press eases there in 150 ms. The handle is a slider for assistive technology. Until you reach for it, the preview sweeps the cut on its own.

Colour grade
Original against edited

The class is wm wm-before-after — the first half is the marker the trigger and reduced-motion rules hook into, the second is the effect.