Skip to content

[FEATURE] Interactive Comparison Image Slider (Before/After)#55795

Merged
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
hruthika18:feature/before-after-image-slider-55696
Jul 25, 2026
Merged

[FEATURE] Interactive Comparison Image Slider (Before/After)#55795
SAPTARSHI-coder merged 2 commits into
SAPTARSHI-coder:mainfrom
hruthika18:feature/before-after-image-slider-55696

Conversation

@hruthika18

Copy link
Copy Markdown
Contributor

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

  • ✨ New animation / hover effect
  • 🧩 New component
  • 📝 Documentation improvement
  • 🐛 Bug fix in an existing submission
  • Other (describe below)

Submission Checklist

⚠️ PRs that fail this checklist will be closed without review.

  • All changes are inside submissions/ (e.g., submissions/examples/your-feature-name/ or submissions/docs/your-feature-name/)
  • Includes demo.html — self-contained, opens in browser with no server
  • Includes style.css — raw CSS for the proposed feature
  • Includes README.md — what it does, how to use it, why it fits EaseMotion CSS
  • No changes to core/
  • No changes to components/
  • One feature per PR (no bundled unrelated changes)

Feature Description

What does this add?
A draggable before/after comparison slider that reveals a top image layer over a bottom one, using clip-path bound to a single CSS custom property.

How does a developer use it?

<div class="compare" style="--clip-offset: 50%">
  <div class="compare-frame">
    <div class="compare-layer compare-layer--before">...</div>
    <div class="compare-layer compare-layer--after">...</div>
    <div class="compare-handle"></div>
  </div>
  <input type="range" class="compare-range" min="0" max="100" value="50" />
</div>

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 added (demo.html works by opening directly in a browser)

Browser Testing

  • Chrome
  • Firefox
  • Edge
  • Safari (optional but appreciated)

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.js is intentionally minimal — it only mirrors the range input's value onto --clip-offset on input; no drag math or animation frame loop.


Reminder: Only the repository maintainer may merge pull requests.
Do not self-merge, even if you have write access.
Maximum 25 active assigned issues per contributor — unassign extras before opening a PR.

Tip: Once you open your PR, feel free to showcase your design or component in the #showcase channel on our official Discord Server!

@github-actions github-actions Bot added animation Animation effects, hover interactions, motion ideas, transitions contribution good first issue Good for newcomers GSSoC-26 Official GSSoC 2026 issue gssoc:approved Approved for GSSoC contributions help wanted Extra attention needed level:advanced Complex issue requiring deep understanding type:feature New functionality or enhancement labels Jul 25, 2026
@SAPTARSHI-coder

Copy link
Copy Markdown
Owner

✅ Submission Validation Passed!

Great job! All required files are present and valid.

📁 Folder: submissions/examples/before-after-image-slider-em

Files found:

  • demo.html
  • style.css
  • README.md

🚀 Next Steps:

  • A maintainer will review your PR
  • Respond to any feedback if requested
  • Once approved, your contribution will be merged!

Thank you for contributing to EaseMotion CSS! 🎉

@SAPTARSHI-coder
SAPTARSHI-coder merged commit dd57e79 into SAPTARSHI-coder:main Jul 25, 2026
13 of 15 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 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!
We have an official Discord server for EaseMotion CSS! Join us to connect with other developers, seek help, discuss design choices, and share your creations in the showcase channel: Join the EaseMotion CSS Discord 💜

⭐ 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! 💻

@github-actions github-actions Bot added accepted Contribution approved for integration into EaseMotion CSS good-pr integrated Successfully merged and included in the framework labels Jul 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Pull Request Integrated!

Thank you for your contribution, @hruthika18! Your changes have been successfully merged into main and will be credited to your wall. 🚀

📊 Daily Merge Progress: You have merged 5/150 PRs today. Daily quota resets in 7 hrs.

📢 GSSoC Leaderboard Status Update:
Please note that the GSSoC leaderboard servers are currently experiencing platform-wide downtime, so your points may take a few days to reflect. Rest assured, your merged PR is fully recorded in our repository history and all GSSoC labels are correctly assigned.

🎮 Join our Discord Server!
We have an official Discord server for EaseMotion CSS! Join us to connect with other developers, seek help, discuss design choices, and share your creations in the showcase channel: Join the EaseMotion CSS Discord 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions contribution good first issue Good for newcomers good-pr gssoc:approved Approved for GSSoC contributions GSSoC-26 Official GSSoC 2026 issue help wanted Extra attention needed integrated Successfully merged and included in the framework level:advanced Complex issue requiring deep understanding type:feature New functionality or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants