Before after comparison

Image comparison with a draggable divider, driven by a native range input — so it also works with arrow keys and is announced properly to assistive technology. Up to three comparisons.

Merchant-addable
Yes
Settings
27
Block types
1
Max blocks
3
File
sections/before-after.liquid

Used by default on: Home

Screenshots pending

Captures for Before after comparison at desktop and mobile widths are generated from a live store by npm run shots. They appear here automatically once that has run.

When to use it

Visible, honest transformations — texture, finish, fit, coverage.

Setting it up

  1. Add the section and write the heading and intro under Section content.
  2. Pick a Layout and set Comparison behavior — drag, hover, or reveal.
  3. Add a Comparison block per pairing, with a before image, an after image, and captions.
  4. Match the two images exactly for framing, lighting, and crop. A comparison where the lighting changed is not a comparison.

Where the content comes from

Blocks own the images and captions.

Notes and cautions

  • Before-and-after imagery invites overstated claims and is heavily scrutinized in regulated categories. Keep the pairings honest and the captions factual.
  • The divider is keyboard-operable, which most comparison sliders are not. Do not replace it with a mouse-only widget.

Section settings

Every setting on the section itself, in the order it appears in the theme editor. Group headings match the editor's own grouping.

Section content

EyebrowText
ID
eyebrow
HeadingText
ID
heading
Default
See the difference
Heading sizeDropdown
ID
heading_size
Default
Large
  • Smallsmall
  • Mediummedium
  • Largelarge
  • Extra largexlarge
SubheadingRich text
ID
subheading
Default
<p>Drag the slider to reveal the transformation for yourself.</p>
Content alignmentDropdown
ID
content_alignment
Default
Center
  • Leftleft
  • Centercenter
  • Rightright

Layout

LayoutDropdown
ID
layout
Default
Grid
  • Gridgrid
  • Carouselcarousel
  • Stackedstacked
  • Editorialeditorial
Comparisons per row on mobileDropdown
ID
columns_mobile
Default
1 column
Shown when
layout is 'grid'
  • 1 column1
  • 2 columns2
Image ratioDropdown
ID
image_ratio
Default
Landscape
  • Portraitportrait
  • Squaresquare
  • Landscapelandscape
  • Widewide
Use custom corner radiusCheckbox
ID
use_custom_image_radius
Default
Off
Image corner radiusSlider
ID
image_radius
Default
12
Range
0px to 40px, in steps of 2px
Shown when
use_custom_image_radius

Comparison behavior

Divider orientationDropdown
ID
orientation
Default
Horizontal (drag left and right)
  • Horizontal (drag left and right)horizontal
  • Vertical (drag up and down)vertical
InteractionDropdown

Drag lets shoppers move the handle. Hover follows the cursor on desktop. Reveal plays a short automatic sweep the first time the comparison scrolls into view.

ID
interaction
Default
Drag the handle
  • Drag the handledrag
  • Follow the cursor on hoverhover
  • Reveal on scrollreveal
Starting divider positionSlider

Where the divider rests before the shopper moves it.

ID
start_position
Default
50
Range
0% to 100%, in steps of 5%
Show before and after labelsCheckbox
ID
show_labels
Default
On
Caption alignmentDropdown
ID
caption_alignment
Default
Left
  • Leftleft
  • Centercenter
  • Rightright
Handle styleDropdown
ID
handle_style
Default
Bar
  • Circlecircle
  • Barbar
Divider thicknessSlider
ID
divider_thickness
Default
1
Range
1px to 6px, in steps of 1px

Style

Color schemeColor scheme
ID
color_scheme
Default
scheme-1
Show entrance animationCheckbox

Fades the section in on scroll. Respects the theme animation setting and reduced motion.

ID
enable_entrance_animation
Default
On

Section padding

Top paddingSlider
ID
padding_top
Default
60
Range
0px to 120px, in steps of 4px
Bottom paddingSlider
ID
padding_bottom
Default
60
Range
0px to 120px, in steps of 4px

Blocks

Blocks are added, reordered, duplicated, and removed inside the section. Each type has its own settings.

Comparison comparison

Before imageImage

For the clearest result, use two images with the same dimensions and framing. 1200 x 1200px .jpg recommended.

ID
before_image
Before labelText
ID
before_label
Default
Before
After imageImage
ID
after_image
After labelText
ID
after_label
Default
After
CaptionText

Optional line shown below the comparison, such as a product or treatment name.

ID
caption
Caption linkLink
ID
link