Skip to content

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.

M
Marcus Chen ✓ Verified Expert
E-Commerce CRO & Technical SEO Consultant · Published
⏱️ 2 min read
Live Interactive Example Drag slider to test

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?

MethodSetup TimeMobile Touch & ZoomPage Speed ImpactCost
DiffSlider Embed< 2 minutes60 FPS swipe + 1600% zoomIsolated iframe (0ms JS bloat)Free ($4/mo white-label)
Manual Webflow IX230–60 minutesOften janky on mobile SafariManual image compression neededFree (dev time)
Third-Party Widget SaaS5–10 minutesBasic swipe onlyHeavy shared runtime scripts$5 – $15 / mo + view caps

Step 1: Create Your Comparison Slider

  1. Open DiffSlider and drag in your Before and After images (PNG, JPG, or WebP—up to 10 images supported).
  2. Add clear labels (e.g., Before Renovation / After Staging or Stock Paint / Gloss PPF).
  3. Click Publish and open the Embed tab to copy your responsive HTML iframe snippet.

Step 2: Paste into a Webflow Code Embed Element

  1. Open your project in the Webflow Designer.
  2. Press A (or click + to open the Elements panel), scroll to Advanced, and drag a Code Embed element onto your canvas.
  3. 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>
  1. Click Save & Close, then publish to your .webflow.io staging 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:

  1. Add a Plain Text field called DiffSlider Embed ID to your CMS Collection.
  2. Inside your Collection Page Template, drop a Code Embed block and click + Add Field inside the src attribute to insert DiffSlider Embed ID dynamically (https://diffslider.app/embed/{{wf ...}}).
  3. 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.

M
Marcus Chen Hands-On Tested & Verified

E-Commerce CRO & Technical SEO Consultant · Verified on live instances (Tested on Webflow Designer (Responsive Breakpoints & CMS Collections)).

Editorial Guarantee All tutorials are tested on actual live websites to ensure 0 layout shift (CLS) and zero Core Web Vitals speed penalties.

Examples for your field

Keep reading

Featured on IndieHustles