How to combine Parallax with useTransition (to scroll to change layers (pages) instead of by clicking) #1739
Unanswered
WangYifang
asked this question in
Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to implement a scroll-telling webpage where there are several frames/pages. I want to show them one by one by using scroll interactions. Here is what I have done:
For each page, I have a component, where I use useTransition() to add some fadeIn animations for some elements. Here I use dynamic mounting: only if the activated Page number is larger than this page's page number, will the component be mounted:
For the root component (i.e., App.tsx), I use Parallax/ParallaxLayer to arrange these pages in order.
But now I can only click/doubleClick/... to change pages.... My ideal interaction is to scroll to change pages... So how can I use scroll here?
Beta Was this translation helpful? Give feedback.
All reactions