How to Add a Before and After Slider to Webflow (No-Code Embed Guide)
Learn how to embed a responsive, 60 FPS before-and-after image slider in Webflow using a clean Code Embed block—zero custom JavaScript or paid Webflow apps required.
Webflow gives designers total control over layout and typography, but it does not ship with a native before and after image comparison slider. Most workarounds force you to wire up brittle Webflow Interactions (IX2) with overlapping divs, or pay monthly fees for third-party widget suites that inject heavy scripts and hurt your Lighthouse score.
With DiffSlider, you can drop a 60 FPS, touch-friendly before-and-after slider into any Webflow page or CMS Collection template in under 2 minutes—with 1600% pinch-to-zoom, optional dark/light theming, and zero layout shift.
Why Use DiffSlider Instead of Custom IX2 Interactions or Heavy Widgets?
| Method | Setup Time | Mobile Touch & Zoom | Page Speed Impact | Cost |
|---|---|---|---|---|
| DiffSlider Embed | < 2 minutes | 60 FPS swipe + 1600% zoom | Isolated iframe (0ms JS bloat) | Free ($4/mo white-label) |
| Manual Webflow IX2 | 30–60 minutes | Often janky on mobile Safari | Manual image compression needed | Free (dev time) |
| Third-Party Widget SaaS | 5–10 minutes | Basic swipe only | Heavy shared runtime scripts | $5 – $15 / mo + view caps |
Step 1: Create Your Comparison Slider
- Open DiffSlider and drag in your Before and After images (PNG, JPG, or WebP—up to 10 images supported).
- Add clear labels (e.g.,
Before Renovation/After StagingorStock Paint/Gloss PPF). - Click Publish and open the Embed tab to copy your responsive HTML iframe snippet.
Step 2: Paste into a Webflow Code Embed Element
- Open your project in the Webflow Designer.
- Press
A(or click+to open the Elements panel), scroll to Advanced, and drag a Code Embed element onto your canvas. - Paste your DiffSlider iframe snippet:
<div style="position:relative;width:100%;aspect-ratio:16/10;border-radius:12px;overflow:hidden;">
<iframe
src="https://diffslider.app/embed/YOUR_ID?theme=dark"
style="position:absolute;inset:0;width:100%;height:100%;border:0;"
loading="lazy"
allowfullscreen
title="Before and after image comparison slider"
></iframe>
</div>
- Click Save & Close, then publish to your
.webflow.iostaging domain to test desktop and mobile touch scrubbing.
Pro Tip: Dynamic Before & After Sliders in Webflow CMS
If you run an agency portfolio, interior design showcase, or medspa case-study collection in Webflow CMS:
- Add a Plain Text field called
DiffSlider Embed IDto your CMS Collection. - Inside your Collection Page Template, drop a Code Embed block and click + Add Field inside the
srcattribute to insertDiffSlider Embed IDdynamically (https://diffslider.app/embed/{{wf ...}}). - Every case study automatically renders its own isolated, responsive comparison slider.
Ready to try it? Build your free Webflow slider now, or compare Elfsight alternatives if you are migrating off a view-capped widget.
E-Commerce CRO & Technical SEO Consultant · Verified on live instances (Tested on Webflow Designer (Responsive Breakpoints & CMS Collections)).