From the UX perspective, what's the dark mode priority should be on a site,
localStorage or user default computer theme?
E.g. If a user has a dark theme by default (on a computer), and then the user enabled the light theme (switch on a site), then the next time the user enters a site what value should be applied (default or saved from the localStorage)?
Or have I misunderstood this whole dark mode and doing something wrong?
Top comments (5)
localStorage because that's a more direct signal specifically for your site, but you need to make sure people can also still choose "use system setting", not just toggle between light and dark. I wrote about that here: Your dark mode toggle is broken
Wow thanks, I'll definitely check your article. π
The one from localStorage. The user told your site that they prefer it a certain way, keep it like that.
Thanks! π
Thinking from a perspective of mobile browsing I think it should be from the OS. Dark Mode gets triggered at the os more often on a mobile device depending on the mood, time of day, or location.