NuxtN
Nuxt14mo ago
4 replies
eitaar

nuxt color mode on SSG

Hi there,
I'm new to nuxt. To add dark mode to my Cloudflare-hosted website, I'm using nuxt color mode module and Tailwind CSS.
I discovered that when I visit my website with the theme in light mode, the button in the images—which is the sun logo for light mode and the moon icon for dark mode—is set to moon even for a second or so then changes to sun icon when the page loads in light mode. When the page loads in dark mode, it works perfectly.

Is there anyone who can teach me how to solve this problem?

I'm sorry if the english is bad. I used translator
Nuxt
Dark and Light mode for Nuxt with auto detection
Color-mode · Nuxt Modules
Nuxt Tailwind
Add Tailwind CSS to your Nuxt Applications.
Tailwind CSS for Nuxt
Was this page helpful?