React App showing dark theme after installing daisyUI

Viewed 401

I have installed tailwind css then installed daisyUI. After running my react app it is showing dark theme. I want to remove it. Here is the tailwind.config.js file.

module.exports = {
  content: ["./src/**/*.{html,js}"],
  theme: {
    extend: {},
  },
  plugins: [require("daisyui")],
};```
1 Answers

You can remove all themes by adding these lines to exports object in your tailwind.config.js

daisyui: {
   themes: false,
}

Like this:

tailwind.config.js

module.exports = {
  content: ["./src/**/*.{html,js}"],
  theme: {
    extend: {},
  },
  daisyui: {
     themes: false,
  }
  plugins: [require("daisyui")],
};

This way you are left with light theme only.

Or you can include only the themes you require using this configuration.

module.exports = {
  content: ["./src/**/*.{html,js}"],
  theme: {
    extend: {},
  },
  daisyui: {
     themes: ["cupcake", "cmyk"],
  }
  plugins: [require("daisyui")],
};

Refer to docs for more details.

I hope it helps!

Related