Anavo Plugin Demo
Persistent via localStorage

Dark Mode Toggle

A floating button injects a sun/moon toggle that persists the user's preference and also respects their OS setting on first visit.

No dependencies

Pure JS. Works with any Squarespace template. Toggle position is configurable: bottom-right, bottom-left, top-right, top-left.

CSS variable aware

The plugin sets custom CSS variables on body. Your Squarespace CSS can reference them for further theming beyond just background and text.

OS preference detection

On first visit, if no localStorage key is set, the plugin checks prefers-color-scheme and applies dark mode automatically if the user's OS is in dark mode.

Look for the toggle button in the bottom-right corner