Skip to content

A WordPress block to add a toggle between light and dark mode on your site.

Notifications You must be signed in to change notification settings

LeoSeyers/dark-mode-toggle-block

 
 

Repository files navigation

Dark Mode Toggle Block

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.

Read about it on my blog →

Visual

toggles-2.mp4

About

A WordPress block to add a toggle between light and dark mode on your site.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 77.6%
  • PHP 12.7%
  • SCSS 9.7%