Replies: 1 comment
-
I completely agree—this is a crucial improvement. Typically, the classes or refs passed to the root component aren’t as necessary as those applied to the viewport. Ideally, these should be forwarded directly to the viewport by default. This change would make the base component much more flexible and practical for most use cases. And so the solution you've provided is even better and more flexible, it's the only component where I often use the radix primite directly for those reasons. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there, i want to share a component edit i have been using. a conditionally invoked access to Radix's scrollAreaViewport component. scrollAreaViewport gives access to "onScroll" prop, and some important css like scroll snapping and overscroll behaviour among others.
now you can either use
<ScrollArea className="...">{children}</ScrollArea>
or
<ScrollArea className="..."> <ScrollAreaViewport className="..."> {children} </ScrollAreaViewport> </ScrollArea>
to access viewport props and classes.
this code uses the "default" theme styling, so update the style accordingly
if there is any bugs related to this please report back here. Cheers.
Beta Was this translation helpful? Give feedback.
All reactions