feat(TabList): carousel overflow with arrow navigation - #1978
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
force-pushed
the
navi/feat/tablist-carousel
branch
from
May 2, 2026 22:55
bc3e58e to
246ecab
Compare
Compose XDSCarousel inside XDSTabList for overflow scenarios instead of reimplementing scroll logic. Carousel already handles fade masks, arrow buttons, and smooth scrolling. Changes: - XDSTab: add white-space: nowrap to prevent label line wrapping - XDSTabList: add max-width: 100% so it respects container bounds - Stories: add Overflow and OverflowWithDivider examples using XDSCarousel as a child of XDSTabList
Carousel root had no width/overflow constraint, so inside a flex parent (like XDSTabList nav) the scroller never triggered overflow — content just pushed the container wider. Added min-width: 0, max-width: 100%, overflow: hidden on the Carousel root so the scroller can actually scroll. Also added min-width: 0 on TabList nav for the same flex-shrink reason.
overflow: hidden clips vertically too, hiding the tab underline indicator that sits at bottom: -2px. overflow-x: hidden constrains width without clipping vertical content.
cixzhang
force-pushed
the
navi/feat/tablist-carousel
branch
from
May 2, 2026 23:50
659da14 to
b1e5b62
Compare
cixzhang
marked this pull request as ready for review
May 2, 2026 23:51
cixzhang
enabled auto-merge (squash)
May 2, 2026 23:51
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When tabs overflow the container width, XDSTabList now shows carousel-style arrow buttons at the edges for horizontal scrolling. Each tab retains its intrinsic width from its label — no truncation or equal sizing.
Changes
XDSTabList.tsx
max-width: 100%wrapper so the tab list respects its parent containeruseScrollOverflowhook for overflow detection<div>wraps [prev button] +<nav>scroller + [next button]XDSTabList.test.tsx
TabList.stories.tsx
Overflowstory: 9 tabs in a 400px containerOverflowWithDividerstory: 6 tabs in a 350px container with dividerNotes
This is a draft prototype — things to consider before graduating: