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

Responsive behavior for TabView #5550

Closed
sousajunior opened this issue Apr 12, 2018 · 4 comments
Closed

Responsive behavior for TabView #5550

sousajunior opened this issue Apr 12, 2018 · 4 comments
Labels
Type: New Feature Issue contains a new feature or new component request

Comments

@sousajunior
Copy link
Contributor

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
Today when you are using the TabView component on a mobile screen the tabs stay one over another. I think that behavior harms the design of the page, because can desalign all page.

What is the motivation / use case for changing the behavior?
I had a idea when a saw the google search tabs. They are horizontally scrollable, without desalign the page design.
Its possible to implement the same behavior on TabView when you using on a mobile platforms ?

  • Current TabView

tab1

  • Example of google tabs

tab2

@cagataycivici cagataycivici added the Type: New Feature Issue contains a new feature or new component request label Oct 23, 2018
@agustinsantiago
Copy link

For future readers, I implemented sousajunior's comment like this:

.responsive-tab-view .p-tabview-nav {
  flex-wrap: nowrap;
  overflow-x: auto;

  li {
    flex: 0 0 auto;
  }
}

then when instantiating the tabview:

<p-tabView class="responsive-tab-view">

@acsiseci
Copy link

acsiseci commented Feb 8, 2021

A simple solution method

@media (max-width: 991px){
  ul.p-tabview-nav li{
    width: 100% !important;
  }

  .p-tabview .p-tabview-nav li .p-tabview-nav-link {
    border-color: #efefef !important;
    border-top-right-radius: 0px !important;
    border-top-left-radius: 0px !important;
  }

  .p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link {
    background: #efefef !important;
    font-weight: bold;
  }
}

Web
web
Mobile
mobile

@davisb10
Copy link
Contributor

davisb10 commented Sep 8, 2021

This is being resolved on issue #10119

@mertsincan
Copy link
Member

Yes, fixed in #10119

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants