Displaying the dark mode toggle button using the Guttenberg block editor is easy. Dracula Dark Mode plugin provides Dark Mode Switch Wiget to enable or disable dark mode.
Users can toggle between dark mode and light mode once they click on the dark mode enable/ disable button. This gives users the freedom to have their own preferences for dark mode or light mode.
- Edit any page or post in your WordPress dashboard.
- Click on the plus sign (+) to add a new widget or block.
- In the block search bar, type Dark Mode.
- Select the Dark Mode Switch widget from the search results.
A dark mode enable/ disable switch will be added inside the page or post. Users now can customize the switch as they need and enable or disable dark mode when it’s required.