Before and after slider
Two stacked photos and a draggable handle to show your renovations, haircuts or gardens before and after.
- Tailwind
- React
- CSS
- WordPress
Description
The handle is a real range input: arrow, Home and End keys, a "Before 60 %, after 40 %" announcement for screen readers, and mouse or finger dragging anywhere on the photo. Three projects are picked with toggle buttons. Without JavaScript the photos stay split in the middle; with prefers-reduced-motion the handle moves without animation. Gradients are replaced by your photos while keeping the alternative text.
Code
Loading the code…
The code of this component in
Archive contents
galerie-avant-apres-curseur-html-tailwind.zip3 files · 6 Ko
- index.html14 Ko
- README.md3 Ko
- LICENSE.md1 Ko
Tags
Updated on December 2, 2026.
Reviews
No reviews yet.
In the same spirit

A product photo that zooms in under the pointer, and from the keyboard with Enter and the arrow keys, to inspect the details.
- Tailwind
- React
- CSS
- WordPress

An Instagram-style square grid with a profile header and captions on hover, served by your own site: no social network script or cookie.
- Tailwind
- React
- CSS
- WordPress

Building site photos sorted by dated step on a vertical timeline, with the current step highlighted.
- Tailwind
- React
- CSS
- WordPress

A large photo with clickable thumbnails and arrows, for a product page or a property listing.
- Tailwind
- React
- CSS
- WordPress