Flickering DarkMode #3095
-
Hey guys! I've been migrating my personal portfolio from Webflow to Next.js with Tailwind. But it's flickering whenever I change routes. Does anyone knows how to get around this? I've seen some stuff at the Next.js discussion space but I'm wondering if with the Tailwind approach to it there isn't any other way. Does anyone have any clue about it? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hey! Yeah, it's kinda tricky! Here's a good thread you might find interesting and will get you on the right path: Would you be okay to share the source code of your project too? |
Beta Was this translation helpful? Give feedback.
-
Just figured this out using the incredible https://github.com/pacocoursey/next-themes abstraction. It worked like a charm. Too easy. I highly recommend to anyone using the Tailwind/Next combo. |
Beta Was this translation helpful? Give feedback.
-
i have the same issue but for vite |
Beta Was this translation helpful? Give feedback.
-
If you are using Flowbite (this search result was showing as top for me) then you can use the solution noted here... https://www.flowbite-react.com/docs/customize/dark-mode
|
Beta Was this translation helpful? Give feedback.
Just figured this out using the incredible https://github.com/pacocoursey/next-themes abstraction. It worked like a charm. Too easy. I highly recommend to anyone using the Tailwind/Next combo.