Docs

Image comparison section

The Image comparison section of Borders shows a before and after image with a slider, horizontal or vertical.

Applies to: Borders 3.1.0 and later. Added in: Borders 2.1.0. Last checked: 2026-10-13 against Borders 3.1.0.

The Image comparison section puts two images on top of each other with a handle between them. Customers drag the handle to reveal more of one or the other, for before and after shots or two versions of a product.

Where to find it: select Add section in the theme editor, then choose Image comparison.

Layout

  • Layout sets the direction of the handle: Horizontal (drag left and right) or Vertical (drag up and down).
  • Invert layout on mobile devices switches to the other direction on phones (below 768 px), for example horizontal on desktop and vertical on mobile.
  • Minimum aspect ratio sets the shape of the comparison on tablets and desktops, from Ultra-Wide (21:9) to Square (1:1). Both images are cropped to it.
  • Mobile aspect ratio sets the shape on phones, from Landscape (16:9) to Taller (2:3).
  • The handle starts in the middle.

Images and labels

The section holds two Image blocks: the first is the image underneath, the second the one revealed by the handle.

  • Image is the picture, cropped to the aspect ratio from its center.
  • Mobile image (optional) replaces it on phones.
  • Label is a small tag on the image, for example "Before" and "After". Leave it empty for no label.

Colors

  • Color style under Inner content design sets the handle and labels: Dark uses the color scheme's text color with background-colored text, Light the other way round.
  • Remove border radius and Remove inner padding & border radius change the frame. The other design settings are the shared ones: see General section styling.

Setting up a before and after comparison

Add the section

Select Add section and choose Image comparison. It comes with two Image blocks.

Add the before image

Select the first Image block, upload the "before" picture in Image and type "Before" in Label.

Add the after image

Select the second Image block, upload the "after" picture and type "After" in Label. Use two photos with the same framing so the handle lines them up.

Choose the shape and direction

Set Layout, Minimum aspect ratio and Mobile aspect ratio, and drag the handle in the preview to check.

Why are parts of my images cut off?

Both images are cropped to Minimum aspect ratio (desktop) and Mobile aspect ratio (phones). Choose the ratio closest to your photos, or upload a separate Mobile image (optional) for phones.

Can I add more than two images?

No. The section takes two Image blocks, one for each side of the handle. Add another Image comparison section for a second pair.

All Image comparison settings

Every setting on this page, with its type and default.

On this page