recipes-mvp icon indicating copy to clipboard operation
recipes-mvp copied to clipboard

[Recipe] action or something else that reacts when a component scrolls into view

Open swyxio opened this issue 4 years ago • 2 comments

Proposed Recipe

as above

might want to use https://github.com/russellgoldenberg/enter-view/blob/master/enter-view.js

might want to recreate this with svelte https://pudding.cool/process/scrollytelling-sticky/

or @kevmodrome might have something already

swyxio avatar Jul 05 '20 04:07 swyxio

Perhaps something like this?

https://svelte.dev/repl/9a6087b0b661445ead0b45c0c15d273a?version=3.23.2

Don't know enough to know if sticking with using scroll or changing to intersection observer is best

babycourageous avatar Jul 05 '20 06:07 babycourageous

oh cool! i think threshold maybe a bit too manual, we need to dynamically figure out the position of the element and make it sensitive to resize. i think thats what enter-view.js does if u look at it.

swyxio avatar Jul 05 '20 22:07 swyxio