Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Add tailwind to create react app

npx create-react-app my-project
cd my-project
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
# Update the tailwind.config.js
module.exports = {
  content: [
    "./src/**/*.{js,jsx,ts,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}
# Add this to index.{less,sass,scss,css}
@tailwind base;
@tailwind components;
@tailwind utilities;
Source by tailwindcss.com #
 
PREVIOUS NEXT
Tagged: #Add #tailwind #create #react #app
ADD COMMENT
Topic
Name
4+3 =