Skip to content

feat: add ease-scroll-indicator — reading progress bar at top of page#1389

Merged
SAPTARSHI-coder merged 1 commit into
SAPTARSHI-coder:mainfrom
Pcmhacker-piro:feat/scroll-indicator-1198
Jun 5, 2026
Merged

feat: add ease-scroll-indicator — reading progress bar at top of page#1389
SAPTARSHI-coder merged 1 commit into
SAPTARSHI-coder:mainfrom
Pcmhacker-piro:feat/scroll-indicator-1198

Conversation

@Pcmhacker-piro
Copy link
Copy Markdown

Closes #1198


Pull Request Description

Add a new ease-scroll-indicator component: a reading progress bar fixed at the top of the viewport that dynamically represents scroll progress through page content.


Type of Change

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

Submission Checklist

  • All changes are inside submissions/examples/ease-scroll-indicator/
  • 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 reading progress bar that fills from 0% to 100% as the user scrolls. Uses CSS animation-timeline: scroll() in modern browsers with a lightweight JS fallback for broader compatibility. Supports gradient/solid fill, 3 sizes, custom colour via --ease-scroll-color, hidden state when content fits the viewport, dark mode, and reduced motion.

How does a developer use it?

<div class="ease-scroll-indicator" id="scroll-bar"></div>
var bar = document.getElementById('scroll-bar');
document.addEventListener('scroll', function() {
  var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
  var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
  var scrolled = height > 0 ? (winScroll / height) * 100 : 0;
  bar.style.width = scrolled + '%';
  bar.classList.toggle('ease-scroll-indicator--hidden', scrolled < 0.5);
}, { passive: true });
Why does it fit EaseMotion CSS?
Reading progress bars are a common UX pattern on blogs, documentation sites, and long-form articles  helping users understand how much content remains. This component fills a gap in EaseMotion's component set with a lightweight, progressively-enhanced implementation.
Demo
- Demo added (demo.html works by opening directly in a browser)
Browser Testing
- Chrome
- Firefox
- Edge
- Safari (optional but appreciated)
Notes for Maintainer
CSS uses @supports (animation-timeline: scroll()) for progressive enhancement — modern browsers get the native scroll-driven animation, others get the JS fallback. JS also handles the hidden state when content fits the viewport. Highest z-index token (--ease-z-toast: 9999) ensures it renders above all content. Ready for integration into components/.

New component: a thin fixed-position progress bar at the top of the
viewport that fills from 0% to 100% as the user scrolls. Uses CSS
animation-timeline: scroll() in modern browsers with JS fallback.
Supports gradient/solid variants, 3 sizes, custom colour, dark mode,
and reduced motion.

Closes SAPTARSHI-coder#1198
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

✅ Submission Validation Passed!

Great job! All required files are present.

📁 Folder: submissions/examples/ease-scroll-indicator

Files found:

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

🚀 Next Steps:

  • The 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! 🎉

@Pcmhacker-piro
Copy link
Copy Markdown
Author

heyy @SAPTARSHI-coder
i fixed the assign issue so pls check this

@SAPTARSHI-coder SAPTARSHI-coder added accepted Contribution approved for integration into EaseMotion CSS animation Animation effects, hover interactions, motion ideas, transitions component New UI components (buttons, cards, modals, tooltips, badges) enhancement New feature or request good first issue Good for newcomers GSSoC-26 Official GSSoC 2026 issue gssoc:approved Approved for GSSoC contributions integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement labels Jun 5, 2026
@SAPTARSHI-coder SAPTARSHI-coder merged commit 81b5155 into SAPTARSHI-coder:main Jun 5, 2026
6 checks passed
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 component New UI components (buttons, cards, modals, tooltips, badges) contribution enhancement New feature or request good first issue Good for newcomers gssoc:approved Approved for GSSoC contributions GSSoC-26 Official GSSoC 2026 issue integrated Successfully merged and included in the framework level:intermediate Requires moderate project understanding type:feature New functionality or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

## Feature: Add ease-scroll-indicator — Reading Progress Bar at Top of Page

2 participants