Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

Our dark mode setup

by Roy Revelt   ·   posted on Monday, 16 May 2022   ·   remixreactmetacss

I used to believe that three-theme UI toggle (auto-dark-light) was superior to the two-theme, dark-light. But I don’t think that way anymore.


You see, the three-theme toggle can be replaced by a two-theme toggle, as long as the latter supports both:

  1. the correct initial theme, as per OS setting, and
  2. automatically detects and reacts to OS-level theme changes

And remix-themesopens in a new tab achieves both.

In combination with persistence, it’s almost magical, the next level, at least when compared to simple local storage-based toggles.

↑ back to top
older newer

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab