Before / After Slider
Touch-friendly image comparison with a draggable handle.
Live preview
See it in action.
Fully interactive, drag, click, scroll inside the frame, toggle to mobile.
About this section
Conversion-grade before / after slider with native <input type='range'> for accessibility (keyboard, screen readers), aspect-ratio-locked container, and clip-path-driven reveal, all in vanilla JS.
Install in 90 seconds
- 01
Create /sections/modblo-before-after.liquid.
- 02
Paste the code and save.
- 03
Add the section, upload your before & after images.
The Liquid
Unlock the section code
Before / After Slider is a premium section. Get the full Liquid + scoped CSS paste-ready.
One-time purchase · Lifetime updates · You own the code
Theme editor settings
| Setting | Type | Default |
|---|---|---|
Heading heading | text | , |
Subheading subheading | textarea | , |
Before image before_image | image_picker | , |
After image after_image | image_picker | , |
Before label before_label | text | , |
After label after_label | text | , |
Background bg | color | , |
Foreground fg | color | , |
Handle color handle_color | color | , |
SEO & accessibility notes
- Real <input type='range'> means keyboard users can drag the divider with arrow keys.
- Both images include alt text. Container uses aspect-ratio so no CLS.
Related
