It is more and more common to design a dark version of your project to go
along with the default design. To make this as easy as possible, Tailwind
dark variant that lets you style your site differently when
dark mode is enabled: you can simply check this feature out by pressing
theme switcher located at the right corner or use a shortcut
shift + D.
Enabling dark mode
By default dark mode uses the
prefers-color-scheme CSS media
feature, but you can also build sites that support toggling dark mode
manually using the
class strategy. After that all you got to do
dark class on your
darkMode: 'media' is the default value and is not required to
write it explicit.
More practical is setting a manual type of changing version of your website.
class strategy can be used to support both the user's system
preference or a manually selected mode by using the