proposal(tabs): automatic tab width
See original GitHub issueSummary
Permit me to propose an “auto tab width” property (false
by default) that sets the width
property of tab items to be “auto,” instead of having a maximum width of 10rem.
Justification
The main use case is for using the Tabs
component in a narrow column (i.e. 4
columns or fewer). In the screenshot below, the tabs are contained in “4 columns”.
Auto tab width with Carbon grid overlaid using the Carbon devtools Chrome extension:
Desired UX and success metrics
This feature would work best with 3 or fewer tabs, or with tabs with short labels.
Desired UX would be to have an autoWidth
prop in the React library:
<Tabs>
<Tab autoWidth label="Tab item 1" />
...
</Tabs>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Tabs deep dive: anatomy of a tab - DocuSign
The Text tab above includes width and height properties that determine the size of the tab in pixels. The size of Sign Here...
Read more >Add option to control tab width when viewing files - GitLab
Tabulation character ( 0x09 , \t ) is always rendered with a width of 8 spaces, but many projects use 4 spaces for...
Read more >Variable width tabs (auto width) - css - Stack Overflow
I want the tabs to automatically adjust to the content within them, however I want them to have a max-width of 200px. I...
Read more >Quick Tip: Working With Tabs in InDesign - Design & Illustration
The width of the frame is measured along the ruler and shows the available workspace for inserting tabs. If you change the frame...
Read more >Eclipse Community Forums: C / C++ IDE (CDT) » Tab width?
> but tabs and automatic indentation are 4 spaces width. ... > doc. CDT version is 3.0. > Is it a bug? ......
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
Weighing in; IIRC the design decision was that “every tab should have the same width”, instead of “every tab’s width should be n em”. Given “every tab should have the same width” cannot be implemented for the width of arbitrary content, we set a specific width by default and let application override our style to set the width that accommodates their contents.
I think that conclusion is logical but cc @aagonzales for some additional insight into Tabs usage guidelines!