An expressive, GSAP-powered theme switcher using CSS View Transitions and dynamic polygon clipping masks. When toggled, the incoming theme sweeps across the entire viewport along a diagonal angle.
For interfaces with content scrolling beneath headers and footers, pair the theme transition with ProgressiveBlur from the ui folder to create a smooth, masked backdrop blur:
Wrap your application in DarkModeProvider:
Access reactive theme properties and transition triggers with useDarkMode: