Skip to content

Is it possible to add to existing daisyUI themes? #401

Answered by saadeghi
spences10 asked this question in Q&A
Discussion options

You must be logged in to vote

I think you can require a theme like this, then spread it and change some values:

const {
  "[data-theme=dark]": darkTheme,
} = require("daisyui/src/colors/themes");

module.exports = {
  //...
  daisyui: {
    themes: [
      {
        dark: {
          ...darkTheme,
          primary: "#FF0000",
        },
      },
    ],
  },
};

UPDATE: daisyui/colors/themes file is now moved to daisyui/src/colors/themes

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@saadeghi
Comment options

@spences10
Comment options

@saadeghi
Comment options

@saadeghi
Comment options

@spences10
Comment options

Answer selected by spences10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants