---
title: "Before & After Slider"
path: https://www.eonshowroom.eon.com/en/specials/before---after-slider.html
lastModified: 2026-10-20T00:50:23.493Z
---

# Before & After Slider

# Before & after slider component

The before & after slider component (image comparison slider) provides an interactive visual comparison between two images. It allows users to drag a split divider across the visual area to reveal the difference between a 'before' and an 'after' state in an engaging, scannable format.

Built on the eon-ui-before-after-slider component and integrated directly with Adobe dynamic media, it is suitable for showcasing product transformations, energy renovations, smart home upgrades, or seasonal changes.

### Before & after slider features

- Interactive split comparison: smoothly drag or swipe to reveal details between two overlapping images.
- Dual image tabs: dedicated authoring tabs for before and after images following the familiar card teaser image selection logic.
- Dynamic media powered: automated asset scaling and optimized rendering via dynamic media integration.
- Orientation control: switch between horizontal (left-to-right) and vertical (top-to-bottom) split sliders.
- Configurable split position: set the initial divider offset between 25% and 50% (default: 50%).
- Customizable badges: maintain descriptive before/after labels or hide them entirely.

## Configuration

### Before & after editing in a nutshell

Main configuration options of the headline component

- <strong>Before image tab:</strong>asset selection, alt text, and smart crop settings for the primary baseline image.
- <strong>After image tab:</strong>asset selection, alt text, and smart crop settings for the secondary comparison image.
- <strong>Orientation:</strong> choose between horizontal (default) or vertical sliding direction.
- <strong>Hide before & after label:</strong> checkbox to remove the text badges from the image overlays.
- <strong>Before label / after label:</strong> custom label text fields (defaults to "before" and "after" when unchecked).
- <strong>Slider Start-Position:</strong>range slider setting the initial divider location (25% to 50%, default: 50%).

### In this how to

Quick jump to the most relevant how to topics

- Inserting the component and configuring images
- Adjusting orientation and split position
- Managing labels and accessibility
- Placement and responsive design

![](https://www.eonshowroom.eon.com/cdm-assets/is/content/eonfngdm/digit-1?ts=1794306490568)

#### Configure before & after images

1. Open the component dialog in AEM.
2. Switch to the **before image** tab: 
  - Select your primary asset (e.g. baseline or unrenovated state).
  - Define the required aspect ratio crop.
  - Enter a descriptive **alternative text** (e.g. *'House facade prior to energetic insulation refurbishment'*).
3. Switch to the **after image** tab: 
  - Select your comparison asset (e.g. finished renovation or modern solar installation).
  - **Important:** apply the exact same pixel dimensions, zoom factor, and aspect ratio crop as the before image. Any offset will cause a visual jump during interaction.
  - Enter the corresponding **alternative text** (e.g. *'House facade with newly installed thermal insulation'*).

###

![](https://www.eonshowroom.eon.com/cdm-assets/is/content/eonfngdm/digit-2?ts=1794306490689)

#### Choose slider orientation

Under the **settings** tab:

- **Horizontal (default):** moves the slider handle from left to right. Recommended for landscape formats (16:9, 3:2) and general side-by-side comparisons.
- **Vertical:** moves the slider handle from top to bottom. Use this only when the composition features vertical shifts (e.g. multi-story buildings, roof installations, or stacked technical components).

![](https://www.eonshowroom.eon.com/cdm-assets/is/content/eonfngdm/digit-3?ts=1794306490770)

#### Maintain labels & text badges

**Default badges:** if left blank, the component automatically renders **'before'** and **'after'**.

**Custom badges:** enter clear, context-specific labels (e.g. Current state / planned state, or day / night). Keep them short so they do not cover important parts of the image.

**Hide labels (checkbox):** select **'hide before & after label'** only if the headline, surrounding copy, or visual context already makes the comparison self-evident.

![](https://www.eonshowroom.eon.com/cdm-assets/is/content/eonfngdm/digit-4?ts=1794306490641)

#### Set the initial start position

- Choose the starting divider position displayed when the page loads:
- **50% (Recommended):** splits both images equally down the middle. This immediately signals to the user that the element is an interactive slider.
- **25%:** Displays 75% of one state while teasing 25% of the other. Ideal when the end result (after state) should dominate the view upon page load.

![](https://www.eonshowroom.eon.com/cdm-assets/is/content/eonfngdm/digit-5?ts=1794306490758)

#### Review & publish

**Mobile & touch:** test touch-dragging on mobile to ensure the page does not accidentally scroll sideways.

**Keyboard navigation:** confirm you can focus the slider handle with tab and move it using the arrow left / arrow right (or up / down) keys.

**Text context:** ensure essential facts (such as savings or technical data) are also explained in the accompanying body copy for screen reader users.

Run a **quick publish** to publish the page.

## Does, don'ts and grid usage

![](https://www.eonshowroom.eon.com/cdm-assets/is/image/eonfngdm/dcc25bcb-4735-4645-9822-b49fb3ae81b1?fmt=webp)

### What you should do

- Maintain identical camera angles: both images must share the exact same perspective and focal point.
- Use 50% as standard start position: an equal split makes the interactive comparison immediately recognizable.
- Keep badge labels short: restrict custom labels to 1–3 words to avoid obscuring visual details.
- Provide editorial context: place a headline or descriptive text above or below the slider to explain what is being compared.

![](https://www.eonshowroom.eon.com/cdm-assets/is/image/eonfngdm/9884279e-1390-4634-bda2-7b7d4dc1e149?fmt=webp)

### What you shouldn't do

- Do not compare unrelated subjects: never use the slider to compare two completely different products, layouts, or locations.
- Do not use mismatched crops: never combine different aspect ratios (e.g. a 4:3 image with a 16:9 image).
- Do not use as a generic image gallery: use standard teasers or carousels if you simply want to present multiple images.
- Do not rely on imagery alone for critical facts: always back up the comparison with clear text and data in the surrounding content.

![](https://www.eonshowroom.eon.com/cdm-assets/is/image/eonfngdm/EON_Pattern_1-3%3A2-1?fmt=webp-alpha)
