Skip to content

Enhance TabsField: dark bg, SAIL spacing, full-width separator, align, nav-only - #153

Merged
pglevy merged 4 commits into
mainfrom
enhance/tabs-114
Jul 20, 2026
Merged

Enhance TabsField: dark bg, SAIL spacing, full-width separator, align, nav-only#153
pglevy merged 4 commits into
mainfrom
enhance/tabs-114

Conversation

@pglevy

@pglevy pglevy commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses all items in #114 plus related sub-issues #123, #140, and #141.

Changes

From #114:

  • Removed hard-coded bg-white on tab triggers → bg-transparent with opacity-based active/inactive states so tabs work on any background
  • Separator uses currentColor at 20% opacity — auto-adapts to light and dark contexts
  • Increase default tab spacing to match SAIL (padding 16px vertical / 20px horizontal at STANDARD size); added density prop with DENSE option for tighter layouts
  • Added fullWidthSeparator prop — separator line extends to full component width while triggers stay content-width (works in both horizontal and vertical orientations)

From #123:

  • Added contentsPadding prop (NONE | EVEN_LESS | LESS | STANDARD | MORE | EVEN_MORE) to control content area spacing (default: STANDARD)
  • Also addressed the trigger background transparency issue mentioned in the issue

From #140:

  • Added align prop (START | CENTER | END) for vertical tab label alignment

From #141:

  • Made content optional on TabItem
  • Added navigationOnly prop — suppresses content panel rendering entirely for sidebar nav patterns

Notes

  • contentsPadding is 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 directly

Testing

  • pnpm run build:lib passes clean
  • pnpm run lint — 0 errors (pre-existing warnings only)

Closes #114, closes #123, closes #140, closes #141

…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
@pglevy
pglevy force-pushed the enhance/tabs-114 branch from 0271c05 to 2fd8b22 Compare July 17, 2026 16:32
pglevy and others added 3 commits July 17, 2026 13:26
- 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>
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.
@pglevy
pglevy merged commit 023090d into main Jul 20, 2026
3 checks passed
@pglevy
pglevy deleted the enhance/tabs-114 branch July 20, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant