Monday, September 19, 2022

tailwindcss and daysiui in React

https://tailwindcss.com/docs/guides/create-react-app

https://daisyui.com/docs/use/

index.css // add these lines

@tailwind base;
@tailwind components;
@tailwind utilities;

tailwind.config.js // paste into

/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{html,js,jsx}'],
theme: {
extend: {},
},
plugins: [require('daisyui')],
};

package.json // consider to install

"devDependencies": {
"autoprefixer": "^10.4.8",
"node-sass": "^7.0.1",
"postcss": "^8.4.16",
"react-icons": "^4.4.0"
}

postcss.config.js

module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

//

No comments:

Post a Comment