ThemeSwitch
ThemeSwitch
Resolves a colour-scheme preference against the OS signal and reflects the answer on<html> as data-appearance. System projects no attribute at all — its absence is the state, and color-scheme: light dark already delegates to the OS. Only the live demo below is attached; the state rows are inert copies, so they cannot re-theme the page.
Live demo
Interaction states
Default
Hover
Focus
Active
Disabled
Resolved state
| preference | — |
|---|---|
| appearance | — |
| prefers-color-scheme: dark | — |
| <html data-appearance> | — |