A WordPress block to add a toggle between light and dark appearances, as seen on my blog. Adds a theme-dark
class to the body element, when toggled on. The user's preference is then saved in local storage. Built with @wordpress/create-block.
richtabor / dark-mode-toggle-block Goto Github PK
View Code? Open in Web Editor NEWA WordPress block to add a toggle between light and dark mode on your site.
Home Page: https://rich.blog/dark-mode-toggle-block