Using Tailwind CSS to style your site in dark mode.
Now that dark mode is a first-class feature of many operating systems, it’s becoming more and more common to design a dark version of your website to go along with the default design.
You can simply change layout mode to Dark by doing the below changes in
the file /store/layout.ts
.
Simply set the attribute mode: SITE_MODE.DARK
to the layout store state. It will update the
layout
mode to
Dark mode. No need to change any css or any files.
mode: SITE_MODE.LIGHT
mode: SITE_MODE.DARK