feat(react-utils): add useScrollProgress hook#602
Conversation
🦋 Changeset detectedLatest commit: 3227cda The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new React hook useScrollProgress that tracks the scroll progress of elements within containers, enabling scroll-based animations and interactions.
- Adds comprehensive scroll progress tracking with both inner and outer progress calculations
- Provides TypeScript definitions for entry data, callback functions, and configuration options
- Implements efficient event handling with IntersectionObserver optimization and requestAnimationFrame smoothing
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
3636703 to
5432e1f
Compare
5432e1f to
269ad7a
Compare
269ad7a to
c9e4232
Compare
c9e4232 to
1cfa89b
Compare
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #602 +/- ##
==========================================
+ Coverage 69.23% 70.39% +1.16%
==========================================
Files 64 65 +1
Lines 1001 1054 +53
Branches 247 265 +18
==========================================
+ Hits 693 742 +49
Misses 248 248
- Partials 60 64 +4
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
1cfa89b to
e26bf2b
Compare
e26bf2b to
0b9ce2c
Compare
563c84b to
3227cda
Compare
Add new hook to spy scroll progress on elements. Useful for creating scroll based animations.
Check out the Codesandbox demo.