You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tabs with many items are wrapped to multiple lines #701
ai-triagedIssue received an initial assessment through AI-powered current code and architecture checks.bugscreen width issueContent wider than viewport or prose column
The industry standard for documentation typically suggests a maximum of 3 to 5 tabs. When docs pages display 6 or more tabs, the cognitive load significantly increases and users stop scanning the content.
As a best practice, tabs should never wrap to a second line. Wrapping breaks the mental model of a physical folder tab and makes it difficult to distinguish between the tab bar and the content below it. Wrapping tabs is a problem because they eat into the "above the fold" real-time estate, pushing the actual technical instructions further down, and wrapped tabs create a "staircase" effect that distracts the eye from the documentation. When we consider the mobile experience, wrapped tabs become a vertical nightmare.
Better alternatives we should consider:
For 6 or more tabs, keep the top 4 most frequent choices visible and tuck the rest into a dropdown menu labeled "More...". This would maintain a single clean line.
For high-density documentation, like code examples for many different languages, we could replace the tab bar with a dropdown. This is the current experience in /guide.
All tab content should be equal. As we create tabbed content, writers should be asking themselves if the tabs are truly equal. If we are mixing categories on 5 or more tabs, the content should be rewritten or reformatted.
.tabs uses flex flex-wrap overflow-hidden, so many {tab-item} labels wrap to a new row instead of scrolling horizontally. No commit since the issue was filed has touched the wrap/scroll behavior; recent tab work only fixed ID collisions (#2340) and comment parsing (#3255).
Razor templates: src/Elastic.Markdown/Myst/Directives/Tabs/TabSetView.cshtml and TabItemView.cshtml
Same pattern (and likely same bug) in src/Elastic.Documentation.Site/Assets/markdown/applies-switch.css
Why a CSS-only flip won't work
The radio-pattern markup interleaves input → label → div.tabs-content as siblings inside .tabs, with order-99 w-full on content panels. Flipping .tabs to flex-nowrap; overflow-x: auto would put panels in the same horizontal flow as labels.
Proposed plan
Restructure the rendering so labels are emitted into a .tabs-nav and panels into .tabs-panels. Keep the radio input id/label for wiring.
CSS: .tabs-nav { @apply flex flex-nowrap overflow-x-auto; }, flex-shrink: 0; white-space: nowrap; on .tabs-label, drop flex-wrap/overflow-hidden from .tabs.
Mirror the change in applies-switch.css.
Add a snapshot/CSS-class assertion test under tests/Elastic.Markdown.Tests/Directives/TabTests.cs.
Open questions for UX / writers
Is horizontal scroll the desired UX, or would an overflow menu / "more" dropdown be preferred? (Original report said "Not sure. Horizontal scroll?")
Mobile/touch: native horizontal scroll is fine on touch, but on desktop should we add a visible scroll hint or arrow buttons?
Active-tab visibility: if the selected tab is scrolled off-screen, should we auto-scroll the nav so it's visible on selection?
Should the same fix apply to applies-switch simultaneously, or is its current wrap behavior intentional?
ai-triagedIssue received an initial assessment through AI-powered current code and architecture checks.bugscreen width issueContent wider than viewport or prose column
Activity
KOTungseth commentedon May 14, 2026
The industry standard for documentation typically suggests a maximum of 3 to 5 tabs. When docs pages display 6 or more tabs, the cognitive load significantly increases and users stop scanning the content.
As a best practice, tabs should never wrap to a second line. Wrapping breaks the mental model of a physical folder tab and makes it difficult to distinguish between the tab bar and the content below it. Wrapping tabs is a problem because they eat into the "above the fold" real-time estate, pushing the actual technical instructions further down, and wrapped tabs create a "staircase" effect that distracts the eye from the documentation. When we consider the mobile experience, wrapped tabs become a vertical nightmare.
Better alternatives we should consider:
cotti commentedon May 26, 2026
Triage update — still reproducible on
main.tabsusesflex flex-wrap overflow-hidden, so many{tab-item}labels wrap to a new row instead of scrolling horizontally. No commit since the issue was filed has touched the wrap/scroll behavior; recent tab work only fixed ID collisions (#2340) and comment parsing (#3255).Where it lives
src/Elastic.Documentation.Site/Assets/markdown/tabs.css(line 3,@apply relative mt-4 flex flex-wrap overflow-hidden)src/Elastic.Markdown/Myst/Directives/Tabs/TabSetView.cshtmlandTabItemView.cshtmlsrc/Elastic.Documentation.Site/Assets/markdown/applies-switch.cssWhy a CSS-only flip won't work
The radio-pattern markup interleaves
input → label → div.tabs-contentas siblings inside.tabs, withorder-99 w-fullon content panels. Flipping.tabstoflex-nowrap; overflow-x: autowould put panels in the same horizontal flow as labels.Proposed plan
.tabs-navand panels into.tabs-panels. Keep the radioinput id/label forwiring..tabs-nav { @apply flex flex-nowrap overflow-x-auto; },flex-shrink: 0; white-space: nowrap;on.tabs-label, dropflex-wrap/overflow-hiddenfrom.tabs.applies-switch.css.tests/Elastic.Markdown.Tests/Directives/TabTests.cs.Open questions for UX / writers
applies-switchsimultaneously, or is its current wrap behavior intentional?AI-assisted analysis from current
main.github-actions commentedon Aug 28, 2026
This issue is stale because it has been open 90 days with no activity. Remove the
stalelabel, or leave a comment, or this will be closed in 14 days.shainaraskas commentedon Nov 3, 2026
this would be a useful fix for https://github.com/elastic/docs-content-internal/issues/2149