Open maerzhase opened 3 years ago
@maerzhase This sounds like a great idea. We need to improve the transitions for Material-UI. @gevorgmakaryan considering you have some experience building this animation for https://github.com/gevorgmakaryan/thefront-preview. Which solution would you recommend?
It seems that there is a dependency on #16663.
Since #16663 got closed, I guess we don't tackle this one?
@maerzhase These are different issues and almost independent. We could built the useIntersectionObserver
hook and keep it private.
A
Reveal
component that tracks the "visiblity" of an element and triggers a specific transition.Summary 💡
Common use case is to implement a "reveal"-effect when certain elements scroll into view. Since I love working with
@material-ui
and it comes with it's own set of transitions wouldn't it be great to have aReveal
components that triggers a certain transition when the element scrolls into view and is compatible withmaterial-ui/core
Transitions (and react transition group)?Examples 🌈
I imagine a
Reveal
component with the following API:Of course the
Reveal
component would track elements position viaIntersectionObserver
.Motivation 🔦
I know that there are libraries that do this similarly but e.g.
react-reveal
is not maintained anymore orreact-awesome-reveal
comes with its own solution on building custom transitions.I could contribute a solution by myself if this is interesting at all!