Image Compare — free UI pack by uiCookies

Image Compare – 8 Free CSS, Bootstrap & Tailwind Sets

Image Compare is a pack of eight sets of before and after image comparison sliders, designed and maintained in-house by uiCookies, with no slider or comparison library in any of them. Every set comes in three versions that look the same: plain HTML and CSS, Bootstrap 5 using .ratio, .form-range, .badge, .card, .nav-pills and .btn-check where they fit, and Tailwind CSS 4. The sets cover the classic drag slider, vertical and hover-to-compare versions, two comparisons with no JavaScript, tabs and a fade toggle, renovation and product showcases, a magnifier lens and zoom loupe, a dark photo editor and a modern CSS set with scroll-driven animation, @property and container queries.

A good image comparison slider is built on a real control. A native input type range gives keyboard support, touch dragging and a screen reader announcement for free, where a div with mouse listeners gives none of them, so every slider here is a range input stretched over the photos with an aria-label and a value such as 62% after. The two photos must line up exactly and be described in alt text, so a blind visitor still learns what changed. The divider should sit exactly under the pointer, the labels should get out of the way as it passes, and both images need width, height and srcset so the frame does not jump while they load. Anything that moves on its own, like an intro sweep, should run once and stay still for people who ask for reduced motion.

Aigars Silkalns

Designed & written by Aigars Silkalns

Aigars is the founder of Colorlib and uiCookies and has been designing and shipping free website templates since 2013. Every template and UI pack on uiCookies is designed and maintained in-house.

XLinkedInMore about uiCookies →

Free

We'll send a one-time link to confirm your address. The download works whether or not you tick the box.

Demo