Splitview is a before and after image comparison slider for any website. Two images, one draggable handle, and the visitor sees the difference instantly. It is one JavaScript file and one stylesheet with no dependencies, no jQuery, no build step and no external requests.
Drag the handle with a mouse, a finger or a pen. Or set it to hover mode and it follows the pointer, returning to its start position when the pointer leaves. Turn it vertical for tall images and full-height sections. Give it a start position, custom label text, or let it sweep into place the first time it scrolls into view.
Accessible by default
The handle is a real slider: role="slider", aria-valuemin, aria-valuemax and a live aria-valuenow. It works with the arrow keys, Home, End, Page Up and Page Down, with Shift for a larger step, and it shows a visible focus ring. Animations are skipped for visitors who ask for reduced motion.
Works anywhere
Static HTML, WordPress, Shopify, Webflow, Framer, React, Vue, Svelte, Laravel Blade. If you can put two images and one div on a page, you can use it. Setup is a data attribute; options can be a JSON object in that attribute or passed to the constructor.
Builder included
The demo page is also a visual builder: change the mode, orientation, start position and labels, watch the preview update, then copy the embed snippet. No guessing at markup.
Honest limits
Both images are always downloaded; the clip hides part of the after image but does not save bandwidth. The two images should share an aspect ratio. It is a display control, not a security control: anything behind the clip is still in the page source.
Features
Drag mode and hover mode
Horizontal and vertical orientation
Before and After labels with custom text
Start position from 0 to 100
Auto animate on scroll into view
Keyboard control: arrows, Home, End, Page Up and Page Down
Public API: setPosition, getPosition, animateTo, destroy
splitview:change event on every movement
Automatic setup from data attributes
No dependencies, no build tools, no tracking
You have to login to leave a review!
All Reviews
No Review!
What type of support is included? Verified source code Free support included Download code immediately Quality guarantee for your satisfaction Support: info@sellanycode.com
You have to purchase this item to get support!
You have to login to ask a question!
All Questions
No Question!
$24
Verified source code
Join 36136+ buyers which trust us!
Download code immediately
100% Guarantee For Item! Satisfaction guarantee policy.