Skip to content

Conversation

@reidbarber
Copy link
Member

@reidbarber reidbarber commented Dec 22, 2025

Adds a color scheme switcher to the header for React Spectrum pages.

  • Switches between system preference and the other
  • Doesn't apply to React Aria currently (it will be tricky to get it to fully work with the examples)

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Test the color switcher on S2 docs pages (including the home page).

🧢 Your Project:

@rspbot
Copy link

rspbot commented Dec 23, 2025

@snowystinger
Copy link
Member

Nice! Putting the whole app into the colorscheme that isn't your OS colorscheme causes the search overlay to be wrong

@rspbot
Copy link

rspbot commented Dec 23, 2025

@snowystinger
Copy link
Member

snowystinger commented Jan 5, 2026

Noticed that the bottom of the page https://d5iwopk28bdhl.cloudfront.net/pr/fde4d39fe83e28091754a70459dbaa4c7acdc8b2/ there is no settings, also the /'s are doubled up for some reason. Looks like it's already this way on main, so pre-existing

Also, some things are meeting contrast, like the Explore Components button. It's like some things switched, but not others if my computer is in dark mode but my settings are in light mode :-/
Screenshot 2026-01-04 at 4 37 21 pm

@reidbarber reidbarber changed the title docs: site preferences docs: color scheme switcher Jan 6, 2026
@rspbot
Copy link

rspbot commented Jan 6, 2026

@snowystinger
Copy link
Member

It still won't put the search dialog into the correct color scheme, is that alright?

@rspbot
Copy link

rspbot commented Jan 6, 2026

snowystinger
snowystinger previously approved these changes Jan 6, 2026
@rspbot
Copy link

rspbot commented Jan 7, 2026

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

a little unfortunate that it flickers if your computer is in dark mode on a page load

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

could we visibility hidden the button until we know the current color scheme?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants