Three-way theme switcher: light / dark / system
FeatureShipped· by laama.fusion· 1 day ago
Theme used to be a binary toggle (light or dark). Many users want their dashboard to follow OS preference, so the system option is now first-class.
- New shared module
src/lib/theme/theme.tswithreadSavedTheme,setTheme,applyTheme,subscribeToSystemTheme - All four entry points use it and stay in sync: top-bar
ThemeToggle, sidebar account popover, public user-menu submenu, and/app/account/appearance systemresolvesprefers-color-schemeat apply time and live-listens for OS changes viamatchMedia- Pre-paint inline script in the root layout pins the resolved theme on
<html>before hydration, so there's no FOUC
Closes the related "Theme toggle flickers on first paint (FOUC)" card.
Comments (0)
No comments yet.
Sign in to leave a comment.