Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React App showing dark theme after installing daisyUI

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")],
};
like image 653
Sakin Avatar asked Sep 17 '25 17:09

Sakin


2 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!

like image 105
Amit Avatar answered Sep 19 '25 06:09

Amit


You should set daisyui.themes to empty array, setting it to false will still load light and dark themes.

module.exports = {
  plugins: [require('daisyui')],
  daisyui: {
    themes: [],
  },
};

make sure you stop and rerun the server.

like image 29
Waleed Asender Avatar answered Sep 19 '25 06:09

Waleed Asender