feat(tabs): add alignment prop to control tab list positioning #277
Merged
Conversation
ba73fb3 to
c21fc5e
Compare
H4ad
reviewed
Jun 5, 2026
Contributor
H4ad
left a comment
There was a problem hiding this comment.
The stories looks good but the alignment of the buttons didn't follow what we initially decided when we introduced extra tab content:
Decision at #274 (comment)
- Always render tab-spacer-left so right/center alignment works even when tabBarLeftContent is provided (previously spacer-left was omitted and flex-grow had nothing to target) - Collapse spacer-left to zero-width for default left alignment + left content so left content remains flush against the tab list - Simplify center alignment: rely on two equal flex:1 spacers (left + grow) instead of growing extra-content zones, matching the primary variant behaviour where the [tabs + adjacent content] group is centered
…ushes the whole group
H4ad
approved these changes
Jun 5, 2026
Contributor
H4ad
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
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
Closes #273
Adds an
alignmentprop to both the composedTabsand primitiveTabsListcomponents, allowing consumers to control whether the tab listaligns to the left (default), center, or right within its container.
Changes
TabsAlignment = 'left' | 'center' | 'right'type, exported fromthe package
alignmentprop added toTabsPropsandTabsListPropsjustify-content(center/flex-end) onthe wrapper
correct position without breaking the bottom-border line
tabBarLeftContent/tabBarRightContentStorybook
A new Alignment story covers all six combinations (3 alignments × 2
variants), plus edge cases with extra bar content:
Latest Evidence
Screen.Recording.2026-06-06.at.12.30.04.AM.mov
Test plan
spacer
TabBarExtraContentstories