you don't really need to use a library like next-themes in 2021, tailwind will cover all the requirements for dark mode.

Check out this beautiful youtube video resource for a more detailed explanation


I did solve my problem by look into my custom tailwind.config.js.

variants: {
    extend: {
      backgroundColor: ['dark'],
      textColor: ['dark']

You should enable the utility that you want to work on.

Thank you

Related Query

More Query from same tag