Skip to content
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

Tabs not showing as intended #1652

Closed
kevinvayro opened this issue Dec 20, 2024 · 2 comments
Closed

Tabs not showing as intended #1652

kevinvayro opened this issue Dec 20, 2024 · 2 comments
Assignees

Comments

@kevinvayro
Copy link

What component (if applicable)

Describe the bug
All tab examples are showing as dropdown boxes rather than tabs as intended.

To Reproduce
https://play.tailwindcss.com/YFuDS0sEKo

Screenshots
Expected
Screenshot 2024-12-20 at 20-39-48 Tailwind UI

Current
Screenshot 2024-12-20 at 20-40-05 Tabs - Tailwind UI

@reinink reinink self-assigned this Jan 31, 2025
@reinink
Copy link
Member

reinink commented Jan 31, 2025

Hey there @kevinvayro! My apologies for the delay on this one—we've been super heads down working on the big v4.0 release and are a little behind on GitHub issues. Finally coming up for air after the release last week and catching up on things 😅

So this is actually the intended behavior for these components. When you're on mobile showing tabs can be problematic if there isn't enough space for them all. So we opt to switch from the tabs to a select input on mobile, as choosing items in a native select on mobile devices is generally a nice experience.

That said, that's not the only way you could handle this. You could:

  1. Always show the tabs when you know there will always be sufficient space.
  2. Add horizontal scrolling on mobile instead of using a select input.
  3. Switch to some sort of vertical navigation on mobile.

You get the idea! We opted for a select input on mobile for these components, but you're welcome to modify them in your own project to better fit your particular needs.

Good luck! 🤙

@reinink reinink closed this as completed Jan 31, 2025
@kevinvayro
Copy link
Author

@reinink thanks for coming back to me. The behaviour was actually on desktop rather than mobile but I noticed a couple of weeks back that the examples were now showing correctly again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants