Post

QQ about Dark Mode Toggles on websites How many options do you show to users? - Three values: System, Light, or Dark - Two values: Light, Dark (with one of them mapping to “System” behind the scenes). Why the one or the other? (I have an opinion about it, but I’m looking for external input)

three if you SSR, since you need an explicit 'system' state to avoid a flash before prefers-color-scheme resolves client-side. two is fine for pure client-rendered, just read matchMedia once. syncing multiple open tabs when the OS setting flips mid-session is the annoying part either way.

0 reposts0 likes

No replies yet.