Skip to content

Comments

fix(components): Update SegmentedControl visual styling and add hover state#2919

Open
nad182 wants to merge 3 commits intomasterfrom
JOB-150930/update-SegmentedControl-visual-style
Open

fix(components): Update SegmentedControl visual styling and add hover state#2919
nad182 wants to merge 3 commits intomasterfrom
JOB-150930/update-SegmentedControl-visual-style

Conversation

@nad182
Copy link
Contributor

@nad182 nad182 commented Feb 19, 2026

Motivations

User feedback indicated the selected state of SegmentedControl was unclear. This PR updates the visual styling to improve selected/unselected distinction and adds a hover state.

Changes

Added

  • interactive--background--subtle--hover color token (light: green-200, dark: green-800)
  • Hover state on unselected options with green background tint and animated transition
  • Color documentation entry for the new token

Changed

  • SegmentedControl selected indicator now uses a green border (interactive) instead of the previous neutral border (border--interactive)
  • Container background changed from interactive--background (grey) to surface (white)
  • Container border updated to use border token
  • Label text: selected uses interactive, unselected uses text--secondary
  • Font weight confirmed at semibold (600)
  • Sliding indicator uses border instead of outline to prevent overlap with adjacent hover backgrounds
  • Focus ring moved to ::after pseudo-element to stay above hover layers
  • Transition timing updated from timing-base (200ms) to timing-slow (300ms) with ease-out curve

Deprecated

Removed

Fixed

Security

Testing

  1. Open SegmentedControl stories in Storybook
  2. Verify selected option shows green border, green text, and white background
  3. Verify unselected options show secondary text color
  4. Hover unselected options — should see green background tint with 300ms ease-out transition
  5. Hover selected option — should see no change
  6. Click an unselected option — hover background fades out, indicator slides smoothly
  7. Keyboard-navigate (Tab + arrows) — focus ring should not be covered by adjacent hover backgrounds
  8. Test all sizes (small, base, large) and option counts (2–5)

In Atlantis we use Github's built in pull request reviews.

… state

- Replace grey background with surface/white and use green border for selected indicator
- Add hover effect (green tint) to unselected options only
- Use border instead of outline on indicator to prevent overlap with adjacent hover backgrounds
- Move focus ring to ::after pseudo-element to maintain visibility above hover layers
- Update transition timing from base (200ms) to slow (300ms) with ease-out
@nad182 nad182 requested a review from a team as a code owner February 19, 2026 20:10
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 19, 2026

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 024cbb4
Status: ✅  Deploy successful!
Preview URL: https://34617e2e.atlantis.pages.dev
Branch Preview URL: https://job-150930-update-segmentedc.atlantis.pages.dev

View logs

Copy link
Contributor

@AutumnDaweBaillie AutumnDaweBaillie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry late to get to this today but on the design side this looks good!

The only thing I found is I noticed with the selected item focus state it looks like it's like covering or hiding the green interactive border somehow. Could we find a way to keep that visible green border in there like however the current one still shows a grey border within the focus ring?

Other than that though this looks good! Checked it out locally and the hover and animation between options feels good! 🎉

before/old colors
Image

after/new colors
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants