Blocks

Before/After Block

2 min read

> Interactive comparison slider for showcasing transformations and changes.


Overview

The Before/After block creates an interactive slider that lets visitors compare two states side by side. Use it for image comparisons (renovations, photo editing, design changes) or text transformations (rebrand messaging, code improvements). The draggable slider provides an engaging way to showcase differences.


Fields

FieldDescription
HeadingOptional section title above the comparison
SubheadingSupporting text below the heading
ModeComparison type: Image or Text
WidthMaximum width: Full, XL, Large, or Medium
Show LabelsDisplay "Before" and "After" labels
RoundedApply rounded corners to the container
CaptionOptional caption text below the comparison
Content WidthControl the maximum width of the content area
AnimationEntrance animation effect

Image Mode Fields

FieldDescription
Before ImageThe "before" state image (required)
Before LabelLabel text for the before side
After ImageThe "after" state image (required)
After LabelLabel text for the after side

Text Mode Fields

FieldDescription
Before TextThe "before" state text
Before StyleBackground and text color for before side
After TextThe "after" state text
After StyleBackground and text color for after side
Text SizeFont size classes for the text display

Width Options

WidthDescription
FullFull container width
XLExtra large (max-width constrained)
LargeLarge width
MediumMedium width, centered

Tips

  • For image comparisons, use images with the same dimensions for best results
  • Enable labels to help visitors understand what they're comparing
  • Text mode works great for showcasing messaging changes or code refactoring

Examples

Choose Theme