Ideas for other modifiers
What other scroll-based modifiers would you like to see added?
The obvious one is did-scroll - what other contextual interactions would be useful? Maybe modifier that is tailored to generating impressions? e.g. when an element scrolls into the visible viewport, it calls the handler to note that an impression was registered, configurable with different % visibility thresholds.
How about a simple functional one like scroll-to that will scroll in a certain direction by a certain amount or even to an element?
Or can break it into scroll-left, scroll-right, scroll-up, scroll-down for amount if we want be more explicit?
I think that's a great idea. scroll-to could take an x and y axis and use positive/negative numbers for different directions.
Yeah it'll just wrap around https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo.
We can have another one for scrollIntoView maybe?
I like it. Do you want to just make a separate issue for each modifier you want to propose? Then you can outline what the external API would look like, as well as the high level implementation details of which browser APIs you would leverage. That way, we can go through each of them and proceed from there, using each issue as the task to close when someone implements the deliverable.
Yeah we can do that
Something like memory-scroll but modifier-based might be nice 😀