Diagonal Dark Mode Toggle

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.

Progressive Edge Blur

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:

Setup & Usage

Wrap your application in DarkModeProvider:

Accessing Theme State

Access reactive theme properties and transition triggers with useDarkMode: