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.