KingSora / OverlayScrollbars

A javascript scrollbar plugin that hides the native scrollbars, provides custom styleable overlay scrollbars, and preserves the native functionality and feel.
https://kingsora.github.io/OverlayScrollbars
MIT License
3.8k stars 214 forks source link

Qwik support #663

Open thejackshelton opened 1 month ago

thejackshelton commented 1 month ago

Is your feature request related to a problem? Please describe.

In Qwik UI we currently do a decent bit of hackery to get scroll working correctly. In other headless libraries we see a "scroll area" component, although this tends to be very complex, and often unmaintained and hacky scroll behavior.

Overlay Scrollbars seems like a good fit to use for Qwik UI, if there's a way we can allow people to easily integrate the overlay scrollbars library into their qwik ui components.


Describe the solution you'd like

I'd like to be able to integrate overlay scrollbars with Qwik UI in a way that does not execute code until the scroll interaction. Making the components we use for select, combobox, etc. to play nicely with their own custom scrollbars.


Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

We've considered creating our own scroll area component, and alternative scrollbar libraries


Additional context

I can dedicate some time in the future to trying to figure this out 😅 . Thought I'd bring the idea ahead of time so that the development process would be more straightforward.

KingSora commented 1 month ago

Good day @thejackshelton

I've already played around with qwik and tried to make a overlayscrollbars-qwik wrapper like I've done it with all the other frameworks.

Unfortunately there were some roadblocks, mainly:

The first one is unfortunately a deal breaker and leads to unexpected behavior. I'm not sure whether you have a bit more insight into this topic, possibly having a workaround or idea of how to improve qwik in that area.

You can find my attempt in porting the library to qwik in the feat-overlayscrollbars-qwik branch. Please note that this is unfinished sample code where I just played with how qwik works.

That being said I would gladly collaborate with qwik-ui by creating a port / integration of the library :)