-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll in Tabs #2270
Comments
Would it be because you are using "justify-center" in the parent div? |
The orientation="horizontal" should be a part of Consider this structure once:
|
Produced the same result as wrapping above. |
That is odd. I am trying to reproduce with your code exactly within the ScrollArea but it is still overflowing without any scroll. |
@vijaystroup , did you find a solution? |
No unfortunately. Currently it is not a hindrance to my application, but it may be in the future, that is why I opened this issue now. |
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you. |
Please reopen it |
Reopen. Issue is not resolved. |
Reopen, I'm needed this |
Not solved yet. |
Please, reopen! |
parking, look forward for this |
work for me ❤️ |
Looking for this feature as well. Here's a workaround I did for now:
Not ideal, but I used "bg-muted" on the outer div to give an illusion of a continuous bg for the tab list |
Reopen pls |
|
How to add tailwindcss scroll snap align? |
I get somewhat workable code as:
|
Thank yo so much @gianicolajara - this is great and solves the issue. I set the scroll area component to render a div as per this discussion and then added pb-2 to make the bar render beneath the tabs instead of quatting the bottom padding of the TabTriggers. Is there a way to detect if the tabs have overflown or not so I can conditionally apply that pb? |
https://ui.shadcn.com/docs/components/scroll-area
https://ui.shadcn.com/docs/components/tabs
Looking to implement a elegant horizontal scroll in a Tabs component so I tried using a Scroll component around the Tabs Trigger components.
Outcome was not as expected:
Code:
Without
<Scroll/>
performs normally:Overflow of
<TabsTrigger />
without<Scroll />
:Interested in a solution like this in the event more items get added to TabsList that overflow the parent container.
The text was updated successfully, but these errors were encountered: