> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compare Slider

> Allow customers to visually compare two images using an interactive slider for before/after showcases.

The Compare Slider section allows customers to visually compare two images using an interactive slider. It is commonly used to showcase before/after results, transformations, or product differences.

Compare sliders help demonstrate product effectiveness, quality improvements, or visual transformations through direct visual comparison, making them ideal for beauty, home improvement, and transformation-focused content.

<img src="https://mintcdn.com/digifist/bjFKaYKC6AKrEFcf/images/theme/release/sections/compare-slider/compare-slider-overview.jpg?fit=max&auto=format&n=bjFKaYKC6AKrEFcf&q=85&s=2246e019d34e4cb6f7c9c70acf904439" alt="Compare Slider section overview" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/compare-slider-overview.jpg" />

## What this section controls

This section controls interactive image comparison with the following capabilities:

* Side-by-side image comparison with draggable slider
* Before and after image blocks
* Customizable labels and color schemes
* Full or constrained width layouts
* Multiple aspect ratio options

## How the Compare Slider works

The Compare Slider uses a block-based system:

* Displays two images stacked horizontally
* Users can drag the slider to compare images
* Supports up to two image blocks (Before / After)
* Works best with images that share the same dimensions and perspective

## Getting started

<Steps>
  <Step title="Open Theme Customizer">
    From Shopify admin, access the Theme Customizer.
  </Step>

  <Step title="Add Compare Slider section">
    Add the Compare Slider section to your page or template.
  </Step>

  <Step title="Add image blocks">
    Click **Add block** to add both "Image before" and "Image after" blocks.
  </Step>

  <Step title="Configure images">
    Upload images and configure labels and settings.
  </Step>
</Steps>

<img src="https://mintcdn.com/digifist/88_eeoffSR-rUo_7/images/theme/release/sections/compare-slider/compare-slider-location.png?fit=max&auto=format&n=88_eeoffSR-rUo_7&q=85&s=c56b5f59384e198214cb8edcb9a4921d" alt="Compare Slider section in Theme Customizer" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/compare-slider-location.png" />

## Section settings

Section settings control layout, text content, button behavior, and image proportions.

<Tabs>
  <Tab title="Layout & content">
    ### Section layout

    Controls the overall width of the section.

    **Available options:**

    * **Full:** Section spans the full width of the page
    * **Shrink:** Section is constrained to the content width

    <img src="https://mintcdn.com/digifist/88_eeoffSR-rUo_7/images/theme/release/sections/compare-slider/section-layout.png?fit=max&auto=format&n=88_eeoffSR-rUo_7&q=85&s=be2e9a5038687b9fc3d16fe44119dfaf" alt="Section layout options" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/section-layout.png" />

    ### Heading

    Main title of the section.

    * Supports bold, italic, underline, and links

    ### Heading size

    Controls the size of the heading text.

    **Available options:** S, M, L, XL

    ### Text

    Additional descriptive content displayed under the heading.

    * Rich text support (paragraphs, formatting, links)

    ### Button label

    Defines the section action button text.

    <Note>
      Leave empty to hide the button.
    </Note>

    ### Button link

    URL for the action button.

    ### Button style

    Controls the appearance of the button.

    **Available options:** Filled, Outlined, Text
  </Tab>

  <Tab title="Media settings">
    ### Media aspect ratio

    Controls the aspect ratio of the compared images.

    **Available options:** 1:1, 2:3, 3:4, 4:5, 9:16

    <Tip>
      For the best comparison experience, both images should share the same aspect ratio and visual framing.
    </Tip>

    <img src="https://mintcdn.com/digifist/88_eeoffSR-rUo_7/images/theme/release/sections/compare-slider/aspect-ratio.png?fit=max&auto=format&n=88_eeoffSR-rUo_7&q=85&s=ba521f7e5c9f66ee5471754ccf3b3755" alt="Media aspect ratio options" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/aspect-ratio.png" />
  </Tab>
</Tabs>

## Block settings

Block settings control individual image blocks. The Compare Slider supports a maximum of **two blocks**.

<Warning>
  Both "Image before" and "Image after" blocks are required together for the slider to function correctly. If only one image block is added, the compare slider will not function as intended.
</Warning>

### Available block types

* Image before
* Image after

Both block types share the same settings.

<img src="https://mintcdn.com/digifist/88_eeoffSR-rUo_7/images/theme/release/sections/compare-slider/block-types.png?fit=max&auto=format&n=88_eeoffSR-rUo_7&q=85&s=f18a017f2dfc12b16349c173991a8094" alt="Available block types" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/block-types.png" />

<Tabs>
  <Tab title="Image">
    ### Image

    Select an image using Shopify's image selector.

    <Tip>
      **Recommended:**

      * Same resolution
      * Same subject framing
      * Same lighting conditions

      This ensures smooth and accurate comparison.
    </Tip>

    <img src="https://mintcdn.com/digifist/88_eeoffSR-rUo_7/images/theme/release/sections/compare-slider/image-selection.png?fit=max&auto=format&n=88_eeoffSR-rUo_7&q=85&s=9acd036aa1f366f529005fd0f2e84956" alt="Image selection for comparison" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/image-selection.png" />
  </Tab>

  <Tab title="Label">
    ### Label

    Text displayed on the image to indicate its state.

    **Examples:** Before, After, Original, Edited

    ### Color scheme for label

    Select a Shopify color scheme for the label background and text.

    <Tip>
      Use high-contrast color schemes to keep labels readable over images.
    </Tip>

    <img src="https://mintcdn.com/digifist/88_eeoffSR-rUo_7/images/theme/release/sections/compare-slider/label-settings.png?fit=max&auto=format&n=88_eeoffSR-rUo_7&q=85&s=c6263090131918c0ee0aac04cd3f380e" alt="Label configuration and color scheme" width="3280" height="2186" data-path="images/theme/release/sections/compare-slider/label-settings.png" />
  </Tab>
</Tabs>

## Best practices

* Always use **exactly two blocks** (Before & After) for proper functionality
* Keep images aligned and visually consistent with matching dimensions and framing
* Avoid heavy text inside images to maintain focus on the comparison
* Use concise labels for clarity (single words like "Before" and "After")
* Choose aspect ratios that match your media orientation (portrait vs square)
* Ensure both images have similar lighting and perspective for accurate comparison
* Test the slider interaction on mobile devices to ensure smooth dragging
* Use high-quality images that maintain clarity when scaled

## Common use cases

* **Before / after product results** - Show product effectiveness (skincare, cleaning products)
* **Image retouching comparisons** - Demonstrate editing or enhancement services
* **Design transformations** - Showcase interior design, renovation, or styling changes
* **Feature highlights** - Compare product features or different versions

## Related guides

<Card title="Common Settings" icon="sliders" href="/themes/release/common-settings">
  Learn about common settings shared across sections
</Card>
