Tropix126 / fluent-svelte

A faithful implementation of Microsoft's Fluent Design System in Svelte.
https://fluent-svelte.vercel.app
MIT License
606 stars 26 forks source link

Custom ScrollView component #20

Open Tropix126 opened 2 years ago

Tropix126 commented 2 years ago

Cross-browser scrollbar theming is enraging

To get around this, I want to design a custom ScrollView component, that still uses native scrolling but adds our own DOM-based scrollbar component to accurately replicate WinUI's ScrollViewer.

Considerations:

A good starting place would probably be looking at how https://www.radix-ui.com/docs/primitives/components/scroll-area does it.

paperdave commented 2 years ago

something I would like if this were to be added would be the ability to use the scrollbar itself as a component (give it a height + offset) where it doesn't have a scrollable content area. Is this something you'd consider, even as just an internal component to be used to make a more general ScrollView / Scroll Area component? (wait, is that what the last consideration means)

Tropix126 commented 2 years ago

something I would like if this were to be added would be the ability to use the scrollbar itself as a component (give it a height + offset) where it doesn't have a scrollable content area. Is this something you'd consider, even as just an internal component to be used to make a more general ScrollView / Scroll Area component? (wait, is that what the last consideration means)

ScrollBar would be an internal component I could export, yeah.