Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

tailwind in react

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
//tailwind.config.js
content: [
    "./src/**/*.{js,jsx,ts,tsx}",
  ],
//index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
//import css file in index.js
//restart the server
 
PREVIOUS NEXT
Tagged: #tailwind #react
ADD COMMENT
Topic
Name
1+9 =