feat: useScrollTrigger, useTransform, useEffectEvent#11
Open
clementroche wants to merge 10 commits intomainfrom
Open
feat: useScrollTrigger, useTransform, useEffectEvent#11clementroche wants to merge 10 commits intomainfrom
clementroche wants to merge 10 commits intomainfrom
Conversation
High-performance scroll-triggered progress tracking with GSAP ScrollTrigger-like position syntax. Designed for scrollytelling with full control over effects. - useScrollTrigger: scroll progress (0-1), direction, enter/leave callbacks, steps for staggered animations, offset, disabled toggle, external rect support, Lenis integration, TransformProvider compensation, infinite scroll support - useTransform/TransformProvider: context-based transform accumulation for accurate scroll triggers on parallax-translated elements - useEffectEvent: stable callback ref polyfill for React <19 - Dedicated /scroll-trigger playground with 9 interactive demos - Migrated build from pnpm+tsup to bun+tsdown
…gger entry - Add debug option to useScrollTrigger that registers triggers to a global store - Add Minimap component for visualizing scroll trigger zones - Export useScrollTrigger and Minimap from hamo/scroll-trigger - Add userData to useTransform for passing arbitrary data through the transform hierarchy - Add setUserData to TransformRef and TransformProvider
…/debugger) Ensures importing useScrollTrigger doesn't bundle the Debugger UI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useEffectEvent(stable callback ref for React 17+).useScrollTrigger features
"element-position viewport-position"(top,center,bottom, or pixel values)onEnter,onLeave,onProgresswithprogress,direction,isActive,height,stepsuseRectacross multiple triggers on the same elementmoduloTest plan
bun run build— verify clean buildbun dev— verify playground loads at/scroll-trigger