Once you have installed Tailwind CSS, you need to configure your template paths in your tailwind.config.js file.
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
#Add Tailwind CSS Directives to CSS
Next, you need to add the Tailwind CSS directives to your CSS file. Add the @tailwind directives for each of Tailwind's layers to your ./src/index.css file.
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind base;
@tailwind components;
@tailwind utilities;
#Install Material Tailwind
Once you installed and configured Tailwind CSS, you need to install @material-tailwind/react by running the following command:
npm i @material-tailwind/react@beta
npm i @material-tailwind/react@beta
#Add Plugin and Template Path
Once you installed @material-tailwind/react you need to add mtConfig and the template path to your tailwind.config.js file.
import { mtConfig } from "@material-tailwind/react";