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🥇
STOP GUESSING WHAT TO POST
AI that learns your brand voice and builds a month of consistent, on-brand social content: carousels, posts and hooks that sound like you, not like everyone else's AI.
SaaS · 4,800 views · 45 clicksSaaS · Week 45 · 4,800 views · 45 clicks
🥈
Conversational Backlinks for Busy Founders
Place Backlink Relevant Conversation for your domain across Forums and Conversations
Website · 42,717 views · 225 clicksWebsite · Week 45 · 42,717 views · 225 clicks
🥉
upvote.club
Free Social Media Engagement that Helps Boost Your Content. Upvote Club supports 19 social networks with 100+ engagement actions in one dashboard. Add links to your posts and get free engagement from real users.
SaaS · 40,761 views · 120 clicksSaaS · Week 45 · 40,761 views · 120 clicks
#4
Substack Posting API
Onboard your Agent to Substack. Write Publish on Substack via API
SaaS · 59,713 views · 202 clicksSaaS · Week 45 · 59,713 views · 202 clicks
#5
Seenshot App
Free, Fast, MacOS Screenshot app. Make Screenshot cmd+shift+2 and send it via link
Desktop App · 29,093 views · 124 clicksDesktop App · Week 45 · 29,093 views · 124 clicks
#6
Hand-Placed Backlinks $9.99 per link. Flat rate.
Buy hand-placed forum, Q-A and directory backlinks. Flat $9.99 per link, no subscriptions — you only pay for approved listings.
Website · 4,885 views · 19 clicksWebsite · Week 45 · 4,885 views · 19 clicks
#7
Free Invoice Generator - PDF Invoices in Your Browser, No Sign-Up
A free invoice maker for freelancers and small businesses: fill in the invoice, check the live preview, and download a PDF that looks exactly like it. Any currency, tax per item, three templates, no sign-up, and nothing leaves your device.
3,538 views · 17 clicksWeek 45 · 3,538 views · 17 clicks
#8
Merge PDF Files Free - Combine PDFs in Your Browser, No Upload
A free PDF merger for office workers, students, and freelancers: combine PDFs and images into one file in the browser, reorder files and pages, pick page ranges, keep bookmarks, and open password-protected PDFs. Nothing is uploaded, no sign-up, no watermark.
3,267 views · 14 clicksWeek 45 · 3,267 views · 14 clicks