Premium Before After Media Slider

Description
The ultimate comparison slider for web professionals. Whether you are showcasing photo retouching, construction renovations, or visual effects breakdowns, this Premium Before/After Slider delivers flawless performance. Built with modern, pure Vanilla JavaScript, it completely eliminates the need for bulky libraries like jQuery.
At an unbelievably lightweight 8.5KB (minified), it won't slow down your page speed, yet it packs high-end features you won't find in standard sliders, including Video Synchronization and an interactive "X-Ray" lens mode.
Features
- Image & Video Support: Compare static images or looping videos. Our custom Smart-Sync technology ensures videos stay aligned, even when users switch browser tabs!
- Visual Code Generator Included: No coding required! Use the included visual generator to upload your URLs, customize colors, tweak layouts, and instantly copy the final, production-ready HTML and JS.
- X-Ray Lens Mode: Go beyond the standard swipe bar. Let users explore the "After" image using a movable, customizable magnifying glass effect.
- Horizontal & Vertical Modes: Fits any layout requirement seamlessly.
- Zero Dependencies: 100% Vanilla JS and CSS. No jQuery, no bloat.
- Ultra-Lightweight: Only 8.5KB minified. Perfect for Core Web Vitals and SEO.
- Responsive & Touch-Friendly: Engineered for flawless swiping on mobile devices and tablets.
- Customizable UI: Easily change handle colors, line colors, label text, and toggle "Dark Mode" styling for the labels.
Important Note for Video Users: To ensure maximum compatibility and adhere to strict mobile browser auto-play policies (especially on iOS), video playback is muted by default. This ensures your videos always auto-play flawlessly on iPhone and iPad without blocking user interaction.
Instructions
1. Upload the Library Files
Upload the contents of the /ba-slider folder (main.min.js and style.min.css) to your website server via FTP or your file manager.
2. Use the Visual Generator
Open /generator/generator.html in your browser.
- Paste the Direct URLs of your images or videos (ensure they are already uploaded to your server/WordPress).
- Customize the colors, X-Ray size, and orientation.
- Click "Copy Code" to get your custom HTML and initialization script.
3. Place the Code
Paste the generated code into your website's HTML:
- CSS: Move the
<link>tag to the<head>section. - HTML: Place the
<div class="ba-slider">block where you want the slider to appear. - JS: Place the
<script>tags at the bottom of the page, just before the closing</body>tag.
鈿狅笍 Critical Note on Paths
Ensure the href in the CSS link and the src in the JS link point to the exact location where you uploaded the files in Step 1.
- Example:
href="https://yourdomain.com/css/style.min.css"
For more detailed customization options, please refer to the README.md file included in the main ZIP package.
| Author | vitaliiyavorskyi |
|---|---|
| Category | Scripts & Code / JavaScript / Sliders |
| Price | $13 |
| Extended License | $39 |
| First Release | Apr 21, 2026 |
| Last Update | Apr 23, 2026 |
| Files included | .css, .html, JavaScript .js |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit馃
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website 路 12,847 views 路 46 clicksWebsite 路 Week 49 路 12,847 views 路 46 clicks
馃
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website 路 7,964 views 路 10 clicksWebsite 路 Week 49 路 7,964 views 路 10 clicks
馃
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website 路 15,624 views 路 28 clicksWebsite 路 Week 49 路 15,624 views 路 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website 路 7,784 views 路 2 clicksWebsite 路 Week 49 路 7,784 views 路 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website 路 7,679 views 路 4 clicksWebsite 路 Week 49 路 7,679 views 路 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website 路 7,591 views 路 0 clicksWebsite 路 Week 49 路 7,591 views 路 0 clicks