Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot get the daisyUI theme to work in my tailwind config #439

Closed
lindamacdonald opened this issue Jan 29, 2022 · 4 comments
Closed

I cannot get the daisyUI theme to work in my tailwind config #439

lindamacdonald opened this issue Jan 29, 2022 · 4 comments

Comments

@lindamacdonald
Copy link

Hey there guys, gone through your docs for adding the daisyui them to my next.js project. tried adding it to my tailwind config but it doesnt work any idea would be lovely :) tried adding it to extend: {} which seemed logical to me but that throws an error

module.exports = {
content: [
"./pages//*.{js,ts,jsx,tsx}",
"./components/
/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [

require('daisyui')

],
}

@saadeghi
Copy link
Owner

Config is correct and it should work.
Can you share a small repo so I can reproduce the issue?

@lindamacdonald
Copy link
Author

Just testing on my mobile because i wasnt allowed to answer this thread Yesterday might be my browser 😆 but sure i Will share my repo🙂

@lindamacdonald
Copy link
Author

lindamacdonald commented Jan 30, 2022

ah yes it was my browser playing tricks on me yesterday, so sorry for the other thread, but it kept telling me I couldnt comment on this thread :/ so I have resolved the issue

I placed the daisy theme within the theme section of my Tailwind config which is of course wrong :/. Found a good explanation on youtube and this is the correct way of adding it to my tailwind config for next.js:

module.exports = {
content: [
"./pages//*.{js,ts,jsx,tsx}",
"./components/
/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [require('daisyui')],
daisyui: {
themes:[
"dark"
]
}
}

@saadeghi
Copy link
Owner

I'm glad it's fixed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants