[FEATURE] Interactive Comparison Image Slider (Before/After)#55795
Conversation
✅ Submission Validation Passed!Great job! All required files are present and valid. 📁 Folder:
|
🎉 Congratulations on your PR merge, @hruthika18! 🚀Thank you so much for your valuable contribution to EaseMotion CSS! Your code is now merged into the main branch. 🎮 Join our Discord Server! ⭐ If you haven't already, please consider giving this repository a Star! It helps show your support, increases project visibility, and helps us grow the community. ✨ Thank you again, and happy coding! 💻 |
|
🎉 Pull Request Integrated! Thank you for your contribution, @hruthika18! Your changes have been successfully merged into 📊 Daily Merge Progress: You have merged 5/150 PRs today. Daily quota resets in 7 hrs. 📢 GSSoC Leaderboard Status Update: 🎮 Join our Discord Server! |
Pull Request Description
Adds an interactive before/after image comparison slider to
submissions/examples/, resolving #55696. Solves the lack of a split-screen comparison component for photo-editing and UI-redesign showcases.Type of Change
Submission Checklist
submissions/(e.g.,submissions/examples/your-feature-name/orsubmissions/docs/your-feature-name/)demo.html— self-contained, opens in browser with no serverstyle.css— raw CSS for the proposed featureREADME.md— what it does, how to use it, why it fits EaseMotion CSScore/components/Feature Description
What does this add?
A draggable before/after comparison slider that reveals a top image layer over a bottom one, using
clip-pathbound to a single CSS custom property.How does a developer use it?
Why does it fit EaseMotion CSS?
It keeps the interaction declarative and human-readable — one custom property (
--clip-offset) drives the whole reveal, and a native range input supplies drag, touch, and keyboard support with no custom pointer-tracking JS. That matches the framework's philosophy of small, readable CSS doing the heavy lifting rather than hand-rolled animation logic.Demo
demo.htmlworks by opening directly in a browser)Browser Testing
Notes for Maintainer
Two working instances included (photo color-grade, UI wireframe-to-redesign) to show the component works on both illustrative and flat UI content.
script.jsis intentionally minimal — it only mirrors the range input's value onto--clip-offsetoninput; no drag math or animation frame loop.