v1: tabs that are scrollable do not center
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Tabs that receive the prop centered
should always center.
Current Behavior
They remain left aligned if they are also set scrollable
.
Steps to Reproduce
https://codesandbox.io/s/kk371k1w75
Your Environment
Tech | Version |
---|---|
Material-UI | @next |
React | 16.2.0 |
browser | chrome |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:27 (4 by maintainers)
Top Results From Across the Web
How can I center the scrollable tab? - Stack Overflow
It is because the container of the Tabs has the same width as the Tabs. You should be able to wrap the Tabs...
Read more >Tab bar | Framework7 v1 Documentation
When you have a lot of links and they all don't fit into view, then it could be useful to use scrollable Tab...
Read more >scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs ...
Read more >Visualization Element 'Tabs' - Schneider Electric
The element displays selected visualizations in tabs. The tabs can be ... If there is not space for all tab headers, then a...
Read more >jQuery-ui Scrollable tabs plugin v1.0 - Google Code
make tabs closable · control animation speed · control easing · can make the wrapper resizable (depends on jQueryUi.resizable plugin) · navigate to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have an alternate solution for centered + scrollable tabs and is not dependent on media queries, so works with dynamic number of tabs. Seems to work in Chrome, Firefox and Safari. Does anyone see any issues with this approach?
https://codesandbox.io/s/material-ui-centered-scrollable-tabs-ud26w
I modified @abhisheksarka code to:
And it worked.