Showcase your product’s transformative results with this engaging before-and-after slider. Customers can drag the slider handle to compare two images, creating an interactive experience that highlights improvements, transformations, or product benefits.
Why Use This Slider?
Visually Persuasive: Perfect for beauty, fitness, home improvement, or any product with visible results.
Easy to Customize: Upload your before/after images, adjust styling, and add optional text.
Mobile-Optimized: Works seamlessly on all devices for maximum engagement.
No Coding Needed: Simple Shopify settings with no technical skills required.
Ideal for before/after comparisons, product effectiveness proofs, and customer success stories. Increase trust and conversions with a dynamic visual demo! 🚀
- Need help implementing this? Contact a Shopify developer for professional customization and integration services to make it work perfectly for your store.
Shopify Schema Code
{% schema %}
{
"name": "Before / After Slider",
"settings": [
{
"type": "header",
"content": "Slider Settings"
},
{
"type": "text",
"id": "banner_title",
"label": "Banner Title",
"default": "Clinically Proven Hair Growth"
},
{
"type": "image_picker",
"id": "bf_image",
"label": "Before Image",
"info": "Recommended size: 1200x800px"
},
{
"type": "image_picker",
"id": "af_image",
"label": "After Image",
"info": "Should match dimensions of Before Image"
},
{
"type": "checkbox",
"id": "show_badge",
"label": "Show Badges",
"default": true
},
{
"type": "checkbox",
"id": "grayscale_before",
"label": "Grayscale for Before Image",
"default": false
},
{
"type": "header",
"content": "Content Settings"
},
{
"type": "checkbox",
"id": "show_content",
"label": "Show Content",
"default": false
},
{
"type": "text",
"id": "ba_heading",
"label": "Heading",
"default": "Transformation Results"
},
{
"type": "richtext",
"id": "ba_content",
"label": "Content",
"default": "See the amazing results our customers have achieved with our product.
"
}
],
"presets": [
{
"name": "Before / After Slider",
"category": "Image"
}
]
}
{% endschema %}
Shopify Liquid Code
{% assign unique_id = 'custom_ba_slider_' | append: section.id %}
{% if section.settings.banner_title != blank %}
{{ section.settings.banner_title }}
{% endif %}
{% if section.settings.bf_image != blank %}
{% else %}
{{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
{% endif %}
Before
{% if section.settings.af_image != blank %}
{% else %}
{{ 'image' | placeholder_svg_tag: 'placeholder-svg' }}
{% endif %}
After
{% if section.settings.show_content %}
{% if section.settings.ba_heading != blank %}
{{ section.settings.ba_heading }}
{% endif %}
{% if section.settings.ba_content != blank %}
{{ section.settings.ba_content }}
{% endif %}
{% endif %}
CSS Code
Java Script Code
Key Features:
Interactive Slider: Users can drag to compare before/after images.
Customizable: Add titles, badges (“Before”/”After”), and toggle grayscale for the “Before” image.
Responsive: Works on mobile and desktop with proper image scaling.
Optional Content: Add headings and descriptive text below the slider.
Styling: Clean design with a draggable handle and smooth transitions.
- How To Add Before And After Slider To Shopify? - April 12, 2025
- How to add a Table of Contents for your Blog Posts Using Shopify - April 10, 2025
- How to Add Custom Image with Text section in Shopify (Step-by-Step Guide) - April 10, 2025