Demo: https://velvety-flan-16e644.netlify.app
-
npm install -D tailwindcss postcss autoprefixer
-
npx tailwindcss init -p
-
Config file
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./pages/**/*.{js,jsx,ts,tsx}'],
theme: {
extend: {},
},
plugins: [],
}
- add new component folder within the root then modify the config +
content: [
'./pages/**/*.{js,jsx,ts,tsx}',
'./components/**/*.{js,jsx,ts,tsx}',
],
- Add these tailwind directives in global.css
@tailwind base;
@tailwind components;
@tailwind utilities;
Ref: https://www.youtube.com/watch?v=iP3DnhCUIsE
Thanks go to these wonderful people:
Erwin Agpasa |
- |