feat(#3095): Tabs v2 styling update
Summary
Updates the Tabs component to support V2 design system styling while maintaining full backward compatibility with V1.
Changes
New Props
-
version("1" | "2", default"1"): Controls V1 vs V2 styling
V2 Styling Updates
Typography & Colors
- Active tabs: Semibold weight with blue text
(
color.interactive.default) - Inactive tabs: Medium weight with grey text (
color.greyscale.600) - Hover state: Medium weight with black text (
color.text.default) - All tabs now use 16px/22px typography with -0.5px letter spacing
Spacing
- Gap between tabs reduced from 32px to 16px on desktop
- Desktop padding:
8px 4px 9px 4px(adjusted for 3px indicator + visual spacing) - Mobile padding:
4px 12px 4px 15px(accommodates left-side indicator)
Active Indicators
- Desktop: 3px height bottom indicator with rounded top corners (6px)
- Mobile: 3px width left indicator with rounded right corners (6px)
- Active state: Blue indicator (
color.interactive.default) - Hover state: Grey indicator (
color.greyscale.300) with rounded corners
State Styling
- Focus: Updated focus outline width to 4px (from 3px)
- Hover (Desktop): Bottom border changes to grey underline with rounded corners
-
Hover (Mobile): Left border changes to grey with light grey
background (
color.greyscale.50) -
Container: Updated bottom border color to lighter grey
(
color.greyscale.150)
Other Improvements
- Mobile active tabs maintain light blue background (
color.info.light) - Responsive behavior preserved (horizontal desktop, vertical mobile)
- All state transitions use token-driven colors
Technical Implementation
Token + CSS Approach
- Pseudo-elements (
::after) required for rounded corner indicators - CSS borders cannot apply border-radius to specific corners
- Positioned absolutely within relatively positioned tabs
V2 CSS Scoping
- All V2-specific styles use
.v2class selector - V1 behavior preserved exactly as-is
- Structural changes isolated to V2 scope
Testing
All changes tested in web components playground with:
- Desktop and mobile layouts (responsive transition)
- All tab states (default, active, hover, focus)
- Multiple tab counts (2, 3, 5, 8+ tabs)
- Keyboard navigation (arrow keys, Home, End)
- Hash-based routing and deep linking
- Tab change events and initial tab selection
Related
- Parent issue: #3095
- Design tokens PR for Tabs
- V2 Figma component
@bdfranck updated with your feedback. I pushed an update to this PR and the design tokens PR
:tada: This PR is included in version 1.40.0-dev.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 6.10.0-dev.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 4.10.0-dev.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket: