StealThis .dev

Coach — Transformations

An energetic dark transformations gallery for fitness coaches: drag-to-reveal before/after slider cards, each with weeks and pounds-lost stats, a signature goal badge, and a client testimonial quote. Filter the whole grid by goal — fat loss, muscle gain, recomposition, or endurance — with an animated result count, and drag the electric-lime handle across each photo to watch the transformation happen.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

A social-proof gallery built to sell the outcome. Each card is an interactive before/after comparison: a rounded photo frame layered with two gradient “photos” and a draggable electric-lime handle. Grab the handle (pointer or keyboard) and slide it across to wipe from the before state into the after, with a live vertical seam and glowing grip so the reveal feels tactile. Above every image sits a goal badge, and below it a compact stat strip calls out the numbers that matter — weeks on program and total pounds changed — followed by a short client quote.

The header carries a bold uppercase display headline and a row of filter chips (All, Fat Loss, Muscle Gain, Recomposition, Endurance). Selecting a goal fades out the non-matching cards, reflows the grid, and animates the result counter so the coach can spotlight a single category on demand. Empty states are handled gracefully with a friendly message.

Everything is vanilla: pointer + keyboard handling for the sliders, an accessible slider role with aria values, filter logic driven by data attributes, and a lightweight toast helper that confirms actions like booking a consult. It is fully responsive down to ~360px, collapsing the grid to a single column and enlarging touch targets, with visible focus rings throughout for keyboard users.