🔥 Demo First 🔥
Default light/dark mode mirrors your operating system
You know what really grinds my gears? Explicitly setting my OS to dark mode, going to a website that clearly has a dark mode, and still getting blasted in the retinas by all the bright shades of white.
The only reasonable default mode for the web apps that have them, should be the user's system preference!
Luckily the new media query @media(prefers-color-scheme: dark) is gaining browser support to solve this exact problem.
Use the Window.matchMedia() function to retrieve this setting programatically in Javascript.
In React you could check for this preference fairly easily, then update your app theme dynamically... and responsibly!
For my take on implementing dynamic app themes in React with Styled-Components, check out my post dynamic-theming-with-styled-components-and-nextjs.