feat: make Fact tabs look pressable and tie the selected tab to its content
Back to our planProblem
In plain words: the tabs on the budget post (and any post with Fact tabs) don't look pressable, and when you tap one, the content changes but nothing shows where that tab's area starts and stops. A reader can't tell whether the whole article below changed or only the block under the tabs.
Summary of the owner's request (2026-11-05, Claude in Chrome side panel, text): make the tabs look clickable; give the selected tab and its content roughly the same border or signal, so the selected content clearly belongs to that tab as its area; make clickable tabs slightly elevated and slightly glassy green, with a bit more glass effect and brightness; and connect the tabs more visually to the content.
Proposed fix
In the shared Tabs component (src/platform/ui/Tabs.client.tsx), so every tabs use gets it:
- Tab buttons look pressable: a soft raised shadow and a hover lift (motion-safe), pointer cursor.
- The selected tab is a lighter, glassy green: a translucent primary tint, a primary border, a slightly brighter surface, a stronger shadow.
- The selected tab and its panel share one frame in the same green border, so the panel reads as the tab's own area; the panel ends with a visible bottom edge, so the reader sees where it stops.
- Uses theme tokens only, checked in light and dark; works with scripting off (panels stacked, no frame confusion).
Findings (native first): Radix Tabs already gives the roles and keyboard use; this is styling in the existing kit component, no new package.
Acceptance criteria
- Not done: A tab that isn't selected looks pressable (raised, hover state) in light and dark.
- Not done: The selected tab is clearly marked (green glass tint, border, brighter) and meets 3:1 against its neighbours and 4.5:1 for its text.
- Not done: The selected tab's panel has the same border signal and a visible end, so it is clear what belongs to the tab.
- Not done: Looks right and stays aligned at 320, 430, 768, 1024, 1280 and 1920 px, light and dark; no horizontal scroll.
- Not done: With scripting off, panels still read stacked under their headings.
- Not done: Tests first: a component test for the new classes and the frame; axe passes;
docs/ui/component-set.mdupdated. - Not done: Screenshots of the budget post at the six widths on the PR.
Generated by Claude Code, opens in a new tab