ankurrsinghal / svelte-legos

WIP šŸšœ A framework for Svelte Utilities šŸ’” Current status: 78 utilities.
https://svelte-legos.surge.sh
MIT License
734 stars 27 forks source link

[Feature Request] Element on Stick Action #111

Open SharifClick opened 8 months ago

SharifClick commented 8 months ago

I propose the addition of a new feature to this project that I'll refer to as "Element on Stick Action." This feature would enhance the ability to manage elements as they become sticky during scrolling.

I believe that implementing the "Element on Stick Action" feature would be a valuable addition to the project, and I'm open to contributing or collaborating on its implementation.

Thank you!

bobbymannino commented 8 months ago

This is a great idea, they're actually bringing it into vanilla css at some point as we speak. The problem with doing it in js is the use of intersection observer. It's another thing to compute. The main issue with doing this (for my self anyway) is that what if the element is in two containers each with top padding. That is something I wouldn't know how to implement, but Iā€™d be up for the challenge

ankurrsinghal commented 8 months ago

Sure @SharifClick for the idea. Can you share more details regarding this like any other library or website you this in action? Also please feel free to contribute to this library by raising a PR, I will be happy to merge it.