Enhance TabsField: dark bg, SAIL spacing, full-width separator, align, nav-only - #153
Merged
Conversation
…r, align, nav-only mode - Remove hard-coded bg-white on triggers; use bg-transparent + opacity for dark bg support - Separator uses currentColor with opacity so it auto-adapts to any background - Increase default tab padding to match SAIL (16px/20px), add density prop (STANDARD/DENSE) - Add fullWidthSeparator prop for separator extending beyond tab content width - Add align prop (START/CENTER/END) for vertical tab label alignment (#140) - Make TabItem.content optional + add navigationOnly prop to suppress panels (#141) - Trim stories to essential demonstrations Closes #114, closes #140, closes #141
- Keep inline separator for VERTICAL orientation when fullWidthSeparator is set (the full-width replacement is horizontal-only) - Add contentsPadding to Storybook argTypes for autodocs parity Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This reverts commit 7eb25c1.
Add full-height separator line for vertical tabs when fullWidthSeparator is enabled. The separator extends the full height of the component. contentsPadding prop remains functional in the component but is not exposed in story argTypes to avoid a Storybook rendering issue.
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
Addresses all items in #114 plus related sub-issues #123, #140, and #141.
Changes
From #114:
bg-whiteon tab triggers →bg-transparentwith opacity-based active/inactive states so tabs work on any backgroundcurrentColorat 20% opacity — auto-adapts to light and dark contextsdensityprop with DENSE option for tighter layoutsfullWidthSeparatorprop — separator line extends to full component width while triggers stay content-width (works in both horizontal and vertical orientations)From #123:
contentsPaddingprop (NONE|EVEN_LESS|LESS|STANDARD|MORE|EVEN_MORE) to control content area spacing (default: STANDARD)From #140:
alignprop (START|CENTER|END) for vertical tab label alignmentFrom #141:
contentoptional onTabItemnavigationOnlyprop — suppresses content panel rendering entirely for sidebar nav patternsNotes
contentsPaddingis functional in the component but not exposed in story argTypes due to a Storybook autodocs rendering issue — can be used via code or the controls panel directlyTesting
pnpm run build:libpasses cleanpnpm run lint— 0 errors (pre-existing warnings only)Closes #114, closes #123, closes #140, closes #141