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

TabPanel scrollable? #292

Open
leon2835 opened this issue May 14, 2019 · 3 comments
Open

TabPanel scrollable? #292

leon2835 opened this issue May 14, 2019 · 3 comments

Comments

@leon2835
Copy link

leon2835 commented May 14, 2019

Hi there, is it anyway to scroll inside the tabPanel only? e.g
| Tabs1 | Tabs 2 | Tabs3 |

| //TabPanel section scrollable if height exceed screen height |
Thank You

@vieyama
Copy link

vieyama commented Nov 8, 2019

give the style on your TabList, example :
<TabList style={{ position: "fixed", width: "100%" }} >

and give padding top to the TabPanel:
<TabPanel style={{ paddingTop: "50px" }}>

@deflexable
Copy link

@vieyama doing this stops the controlled feature

@alexpapworth
Copy link

Hello, here is a simple solution to achieve scrollable tabs.

  1. Add a container around <TabList> and assign overflow: scroll.
  2. Assign width: max-content; to .react-tabs__tab-list

Demo available here: https://codepen.io/alexpapworth/pen/eYaNorx

Screenshot 2024-05-15 at 13 36 35

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

4 participants