feat(tabs): scroll fade for overflowing segmented tabs#504
feat(tabs): scroll fade for overflowing segmented tabs#504mattrothenberg wants to merge 3 commits intomainfrom
Conversation
Segmented tabs now scroll horizontally when overflowing, with gradient fades on the edges driven by scroll-driven animations (Chrome 115+, degrades gracefully). Scrollbar is hidden — the fade is the affordance. - scroll-fade-x CSS in kumo-binding.css using mask-image + animation-timeline - ResizeObserver sets data-overflowing attribute to activate the fade - overscroll-behavior-x: contain prevents page scroll at edges - Ported from stratus RouteTabs implementation by Balint
|
/bonk please review |
|
I've reviewed PR #504. Here's my analysis: SummaryThis PR adds horizontal scroll fade functionality to segmented tabs, ported from the Code Review
|
commit: |
|
/bonk can you approve |
Docs PreviewCommit: |
There was a problem hiding this comment.
bonk approves ✅
The scroll fade implementation for segmented tabs is well-executed:
- Clean hook with proper ResizeObserver cleanup
- Progressive enhancement via
- Clever mask-image technique with no extra DOM elements
- Proper for UX
- Follows Kumo conventions throughout
Ready to merge.
There was a problem hiding this comment.
bonk approves ✅
The scroll fade implementation for segmented tabs is well-executed:
- Clean useOverflowDetect hook with proper ResizeObserver cleanup
- Progressive enhancement via @supports animation-timeline
- Clever mask-image technique with no extra DOM elements
- Proper overscroll-behavior-x for UX
- Follows Kumo conventions throughout
Ready to merge.
|
✅ bonk has approved PR #504 The scroll fade feature for segmented tabs is approved and ready to merge. |
Unsupported browsers (Firefox, older Safari) keep the native scrollbar as a fallback affordance since they do not get the fade.
- Use full-size segmented Tabs in PageTabs (drop size="sm") - Tabs auto-overflow horizontally via PR #504 scroll-fade - Tab CTAs collapse into a DropdownMenu ellipsis on small screens - Move data-mode="dark" from wrapper div to <html> so portaled overlays inherit dark theme Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>



























Summary
Segmented tabs now scroll horizontally when overflowing, with gradient fades on the edges that respond to scroll position
Uses scroll-driven animations (
animation-timeline: scroll()) — Chrome 115+, degrades gracefully to no fade in unsupported browsersResizeObserverdetects overflow and setsdata-overflowingvia React state to activate the fadeScrollbar hidden — the fade is the scroll affordance
overscroll-behavior-x: containprevents page scroll when hitting tab edgesBaked into all segmented tabs automatically — no prop needed
Reviews
bonk has reviewed the change
automated review not possible because: visual/interaction change needs manual review
Tests
Additional testing not necessary because: CSS-only fade with JS overflow detection, no logic changes to tab behavior