Menu

Why we built an ultra-lightweight, 60fps image slider in Astro (and dropped legacy jQuery)
📰

Why we built an ultra-lightweight, 60fps image slider in Astro (and dropped legacy jQuery)

DEV Community: frontend·William jack·3 days ago
#ldXE0Ftu
#devtofrontend#devto#dev#diffslider#embed
Reading 0:00
15s threshold

William jack

Most web designers still use image sliders built a decade ago (like jQuery TwentyTwenty or JuxtaposeJS). On mobile devices, they lag, cause severe layout shifts (CLS), and require third-party dependencies.

We wanted a modern, privacy-first solution where high-res photos could be compared client-side without uploading private assets to cloud servers.

So we created DiffSlider:

Zero Server Uploads: Full comparison runs locally in browser RAM using HTML5 Canvas.
Hardware-Accelerated 60 FPS: Smooth touch dragging powered by CSS clip-path.
Interactive Embeds: Embed responsive sliders on Shopify or WordPress with a single line of HTML.

You can also check our newly published open-source embed SDK on npm: npm install diffslider-embed.

Live demo: https://diffslider.app