Before/After widget for Elementor

Two images, one on top of the other, with a divider to drag across: a renovation, a retouched photo, a redesign. Here, our own widgets: light against dark, and one design against another.

Horizontal or verticalDrag, follow the mouse or clickLabels always, on hover or hiddenCrop to a shapeKeyboard and screen readersRight to leftNo library

Design

Soft

The default: white cards with a thin border, generous rounded corners and a soft shadow, pill-shaped controls, and pale tints of the accent.

The Info Box widget in the Soft design, light
The Info Box widget in the Soft design, dark
The Counter widget in the Soft design, light
The Counter widget in the Soft design, dark

Dark colour scheme

Soft, dark

The same design with the Dark colour scheme, for dark sections and dark sites.

The Info Box widget in the Soft design, light
The Info Box widget in the Soft design, dark
The Counter widget in the Soft design, light
The Counter widget in the Soft design, dark

Design

Outline

Drawn with lines: framed cards with small corners, outlined buttons, labels and badges, and the accent in the lines.

The Info Box widget in the Outline design, light
The Info Box widget in the Outline design, dark
The Counter widget in the Outline design, light
The Counter widget in the Outline design, dark

Dark colour scheme

Outline, dark

The same design with the Dark colour scheme, for dark sections and dark sites.

The Info Box widget in the Outline design, light
The Info Box widget in the Outline design, dark
The Counter widget in the Outline design, light
The Counter widget in the Outline design, dark

Design

Solid

Flat filled shapes: cards in a pale tint of the accent with no border and a small lift in the light scheme, solid buttons and markers, and the highlighted part filled with the accent.

The Info Box widget in the Solid design, light
The Info Box widget in the Solid design, dark
The Counter widget in the Solid design, light
The Counter widget in the Solid design, dark

Dark colour scheme

Solid, dark

The same design with the Dark colour scheme, for dark sections and dark sites.

The Info Box widget in the Solid design, light
The Info Box widget in the Solid design, dark
The Counter widget in the Solid design, light
The Counter widget in the Solid design, dark

More options

One design against another

Soft before, Solid after, following the mouse: move across the picture and the divider comes along. Here in Outline, with a blue accent.

The Comparison Table widget in the Soft design, light
The Comparison Table widget in the Solid design, light

Cut to a shape, moved by a click

Both images cropped to 16:9 from the top of a timeline, the labels at the end, and the divider jumping wherever you click or tap.

The Timeline widget in the Outline design, light
The Timeline widget in the Outline design, dark

Guide

How to use the Before/After widget

Four steps from an empty page to a finished before/after.

  1. 1

    Add the widget

    Open a page in Elementor, search the panel for "Before/After" or open the Handy Addons group, and drag the widget onto the page.

  2. 2

    Choose the two images

    Pick the before image and the after image from the media library, and give each a label, such as “Before” and “After”, and alt text if the library has none.

  3. 3

    Choose its design

    In the Style tab, the Design section sets the design, the colour scheme and the accent colour.

  4. 4

    Make it yours

    Every colour, font and spacing is a normal Elementor setting, with your global colours and fonts in the pickers.

What's in its panel

The widget's settings, tab by tab.

Content tab
  • Images: the before and after images, their labels and alt texts, and the image size.
  • Comparison: horizontal or vertical, how the divider moves (dragging, following the mouse or clicking), where it starts, and the shape: the after image’s own, or 16:9, 3:2, 4:3, 1:1, 4:5 or 9:16.
  • Labels: always, on hover or hidden, at the start, in the middle or at the end.
Style tab
  • Design: the design (Soft, Outline or Solid), the colour scheme (Light or Dark) and the accent colour. Changing the accent restyles the whole widget, tints included.
  • Every other section: Divider (colour and thickness), Handle (size, background, arrows), Labels (type, colours, padding, distance from the edge, corners) and Frame (corners). Each overrides the design.
  • Reset buttons: a small undo icon after a setting’s label puts that one setting back to its default.
Advanced tab

Elementor’s own: margins, padding, position, responsive visibility, CSS classes and attributes, as on any widget.

FAQ

Questions about the Before/After widget

Do both images need the same size?

No, but they line up best if they do. With a shape such as 16:9, both are cropped to cover it.

Can it be used with the keyboard?

Yes. The divider is a real slider: the arrow keys, Page Up, Page Down, Home and End move it, and a screen reader hears how much of the before image shows.

What do visitors see without JavaScript?

The comparison, still, at its starting position.

Does it work in right-to-left languages?

Yes. The before image starts on the right, and the arrow keys follow.

Often used with it

Gallery

Photos in a grid, masonry or justified rows, with filters, captions and a viewer that opens them full size.

Document Viewer

A PDF readable on the page, sharp on any screen, with pages, zoom and full screen, and a plain link when it can't be shown.

Info Box

An icon, image or number with a title, a description and a link or button, above or beside, in a card that can link as a whole.

Twenty widgets, free, in three designs.

Install Handy Addons from WordPress.org, open a page in Elementor, and find them in the Handy Addons group of the panel.