FreeWidget

Before After widget documentation

Before After compares two images of the same size and framing. Use images with the same dimensions, or let Object Fit crop them to match.

Overview

The Xtra Before After widget is a free Elementor image comparison slider. Two images sit on top of each other and a draggable handle reveals one or the other, so visitors can see a result for themselves instead of reading about it.

Compare left to right or top to bottom, choose where the handle starts (anywhere from 5% to 95%) and show or hide the Before and After labels at the edges or in the centre. Both images always keep the same size and position while you drag, so the comparison stays perfectly aligned.

The slider works with the mouse, with touch and with the keyboard: focus the handle and use the arrow keys. Colours, handle size, divider width, label style, corner radius, border and shadow are all adjustable from the Style tab.

You will find the widget in the Elementor panel under the Xtra widgets, or search for “Before After”. It is part of the free Xtra Addons for Elementor plugin — see the Before After widget page for live demos.

Quick start

  1. Drag the Before After widget from the Xtra widgets into a column or container.
  2. Under Content → Images, choose the Before Image and After Image, edit the Before Label and After Label, and pick an Image Size.
  3. Under Content → Settings, choose the Orientation (Horizontal or Vertical) and set the Initial Position (%).
  4. Turn Show Labels on or off and choose the Label Position (Edges or Center).
  5. Open Style → Handle to set the Handle Color, Handle Circle Size, Circle Background, Box Shadow and Divider Line Width.
  6. Open Style → Labels for the typography, Text Color, Background, Padding and Border Radius of the labels.
  7. Open Style → Image to set a Max Height, the Object Fit and Object Position, the Border Radius, Border and Box Shadow.

Options reference

All 31 options of the Before After widget, as they appear in the Elementor panel. Many options are responsive and can be set separately for desktop, tablet and mobile.

Content tab 11 options

Images

OptionTypeValues and notes
Before Image Image
Before Label Text
After Image Image
After Label Text
Image Resolution Select Thumbnail - 150 x 150Medium - 300 x 300Medium Large - 768 x 0Large - 1024 x 10241536x1536 - 1536 x 15362048x2048 - 2048 x 2048Woocommerce Thumbnail - 300 x 300Woocommerce Single - 600 x 0Woocommerce Gallery Thumbnail - 100 x 100FullCustom
Image Dimension Image size You can crop the original image size to any custom size. You can also set a single value for height or width in order to keep the original size ratio.

Settings

OptionTypeValues and notes
Orientation Select HorizontalVertical
Initial Position (%) Slider
Handle Style Select Circle with ArrowsLine OnlySquare
Show Labels On / off
Label Position Select EdgesCenter

Style tab 20 options

Handle

OptionTypeValues and notes
Handle Color Color
Handle Circle Sizeresponsive Slider
Circle Background Color
Box Shadow Box shadow
Position Select OutlineInset
Divider Line Width (px) Slider

Labels

OptionTypeValues and notes
Typographyresponsive Typography Font family, size, weight, transform, style, decoration, line height, letter spacing and word spacing.
Text Color Color
Background Color
Paddingresponsive Dimensions
Border Radiusresponsive Dimensions

Image

OptionTypeValues and notes
Max Heightresponsive Slider Limits overall height; images scale within the box (use Object fit to control cropping).
Fit Select FillContainCoverNone
Object position Select CenterTopBottomLeftRightTop LeftTop RightBottom LeftBottom Right
Border Radiusresponsive Dimensions
Border Type Select DefaultNoneSolidDoubleDottedDashedGroove
Border Widthresponsive Dimensions
Border Color Color
Box Shadow Box shadow
Position Select OutlineInset

Tips

  • Use two images with identical framing. The comparison is most convincing when only the thing you are showing changes.
  • Set a Max Height with Object Fit set to Cover if your images are very tall, so the slider does not push the page down.
  • Put the key difference near the Initial Position so visitors see it without having to drag.
  • The labels sit over the images, so choose a label background that stays readable on both.

Frequently asked questions

Is the Xtra Before After widget free?

Yes. Before After is included in the free Xtra Addons for Elementor plugin. You do not need Elementor Pro.

How do I add a before and after slider in Elementor?

Add the Before After widget, choose a Before Image and an After Image under Content → Images, and optionally change the labels and starting position. Visitors drag the handle to compare the images.

Can the slider be vertical instead of horizontal?

Yes. Set Orientation to Vertical under Content → Settings. The Before image is then revealed from the top and the handle moves up and down.

Does it work on mobile and with a keyboard?

Yes. The handle can be dragged by touch, and it can be focused with the keyboard and moved with the arrow keys.

Can I hide the Before and After labels?

Yes. Turn off Show Labels under Content → Settings, or keep them and change the text, position, colours and padding.

Do both images need to be the same size?

They should have the same framing for a clean comparison. The After image sets the height of the slider and the Before image is stretched over it, with Object Fit controlling how it is cropped.

See the Before After widget in action

Live demos, features and use cases are on the widget page.

Open widget page