www.example.com/path/to/page
Tab group expand / collapse spec

Mapped to Motion Principles large spatial panels (sidebar strip): expressive open, slightly quicker close. Spatial motion uses --motion-ease-emphasized; opacity and counter fades use --motion-ease-standard. Durations are fixed per path — not scaled by tab count.

Animation paths

Full expand No tab selected in group. max-height opens; tab list fades in and shifts down 4px. 200ms Emphasized.
Full collapse No tab selected. max-height → 0; tabs fade out + shift up 4px (30ms delay); hairline height → 0 over 160ms Emphasized with tail fade (120ms Standard, starts halfway through tab span).
Partial collapse Selected tab stays visible; hidden tabs collapse to a +N counter. 200ms Emphasized spatial master. Sub-path depends on which tab is selected (see below).
Partial expand Expanding a partially collapsed group with a selection. Same spatial enter as full expand (200ms); selected tab list shifts down 4px; +N counter fades out.

Partial collapse sub-paths

Top tab selected data-selected-anchor-top — selected tab stays put; tabs below fade out (100ms); hairline keeps natural stretch (no shrink animation); counter fades in below selected tab.
Middle tab selected Selected tab slides up to top (200ms, 30ms delay); hairline shrinks from full height to collapsed height; tab below selected crossfades out; +N counter fades in (110ms).
Bottom tab selected data-lower-selected-collapse — same slide + stroke shrink; counter crossfades with a coordinated slide (data-count-crossfade).

Spatial tokens

--tab-group-expand-enter 200ms Emphasized — full expand max-height, list shift enter, drag hairline grow
--tab-group-expand-exit 160ms Emphasized — full collapse max-height, list shift exit
--tab-group-partial-collapse-exit 200ms Emphasized — partial collapse max-height, selected-tab slide, hairline shrink
--tab-group-shift-enter 200ms Emphasized — tab list enter shift (translateY(-4px) → 0)
--tab-group-shift-exit 160ms Emphasized — tab list exit shift (0 → -4px)

Fade & stagger tokens

--tab-group-fade-exit 110ms Standard — full-collapse tab list opacity
--tab-group-tabs-fade-exit-delay 30ms — delay before full-collapse tab fade/shift starts
--tab-group-partial-collapse-selected-fade-delay 30ms — stagger before selected-tab slide on partial collapse
--tab-group-partial-collapse-below-fade 100ms Standard — hidden tabs below selection, expand counter fade-out
--tab-group-partial-collapse-count-fade 110ms Standard — +N counter fade-in
--tab-group-stroke-tail-fade 120ms Standard — full-collapse hairline opacity tail after spatial shrink begins
--tab-group-stroke-tail-fade-start-ratio 0.5 — tail fade delay = halfway through tab-span height recession

Layer choreography

max-height Primary spatial driver on .tab-group-collapse-inner. Measured in JS before each toggle; partial collapse targets selected-tab + counter height.
Hairline (.tab-group-stroke) 2px vertical rule beside tabs. Full collapse: height → 0 (160ms Emphasized) with tail fade (120ms Standard). Partial collapse (non-top): height animates from expanded to collapsed over 200ms. Drag preview: height grows with drop placeholder (200ms).
+N counter Shown when collapsed with a selection. Text = hidden tab count. Click or Enter expands group. Crossfade position computed from selected-tab geometry.
Collapse sequencing Double requestAnimationFrame before max-height animates on collapse (~32ms) so the browser commits the start height.

JS cleanup timers

TAB_GROUP_EXPAND_ANIM_MS 240ms — clears is-group-animating after expand (~40ms buffer over 200ms spatial)
TAB_GROUP_COLLAPSE_ANIM_MS 240ms — full collapse cleanup (160ms spatial + 120ms tail fade buffer)
TAB_GROUP_PARTIAL_COLLAPSE_ANIM_MS 240ms — partial collapse cleanup (200ms slide + 30ms delay + buffer)

Prototype defaults

Shopping Expanded, no selected tab — use for full expand/collapse.
Travel Expanded, 3rd tab selected (8 tabs) — use for partial collapse.

Reduced motion: prefers-reduced-motion: reduce disables expand/collapse animations, list FLIP shifts during drag, and drag hairline resize. Groups snap to end state.

Gmail
YouTube
GitHub
Twitch
Booking.com
Airbnb
Skyscanner
Expedia Travel: Vacation Homes, Hotels, Car Rentals, Flights & More
www.booking.com/hotel/es/barcelona
Horizontal tab group expand / collapse spec

Mapped to Motion Principles inline expansions (tab strip): 130ms enter / 105ms exit Emphasized spatial — exit ~25ms faster than enter. Partial paths use a slightly longer spatial pass (170–190ms) so tab slides stay legible; fades stay in the 100–110ms Standard range and lead or trail spatial slightly. Deselect collapse fades tab content (80ms) before spatial clip (100ms).

Horizontal timing tokens

--h-tab-group-expand-enter 130ms Emphasized — full expand max-width
--h-tab-group-expand-exit 105ms Emphasized — full collapse (exit faster than enter)
--h-tab-group-partial-collapse-exit 170ms Emphasized — inner max-width + tab width shrink
--h-tab-group-partial-expand-enter 190ms Emphasized — partial expand spatial master
Fades / stagger Partial collapse: spatial clip only. Expand: sibling fade 110ms Standard after 24ms. Full-collapse tab fade 100ms after 20ms. Hairline tail fade 110ms.

Layout

Group cluster Label pill + grouped tabs in a single row. A 2px hairline (.h-tab-group-stroke) spans the full cluster width beneath label and tabs.
Label radius Violet groups: 16px 16px 16px 4px (flat bottom-left). Green label-only: 16px 16px 4px 16px.
Active tab White fill, #b89cff border — matches Figma selected tab treatment.

Collapse path

Full collapse max-width → 0 with tabs sliding translateX(-4px) + fade via keyframe. Hairline width → 0 with a 110ms Standard tail fade. 105ms Emphasized spatial / 105ms shift (20ms delay).
Partial collapse Cluster and hairline shrink (170ms Emphasized). Selected tab slides left into collapsed slot; sibling tabs after it clip away spatially. Tabs before selected fade out in place during the slide.
Hairline Partial collapse/expand: tracks cluster width spatially. Full collapse: width → 0 with tail fade (100ms Standard) from mid tab-span. Full expand: width grows from 0.
Expand path Partial expand: 190ms Emphasized spatial with sibling tab fade trailing by 24ms. Full expand: 130ms Emphasized spatial; hairline tracks cluster growth.

Prototype defaults

Barcelona trip Expanded violet group — full expand/collapse (no selected tab).
Reading list Collapsed green group, 3rd tab (Netflix) selected — strip’s only active tab; partial collapse with +N counter.
Booking.com Inactive standalone tab outside groups.