Answers for "tail wind install"

CSS
4

tailwind install

Step 1:

npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9

Step 2:

npm install @craco/craco

Step 3:

package.json: 
{
    // ...
    "scripts": {

     "start": "craco start",

     "build": "craco build",

     "test": "craco test",

     "eject": "react-scripts eject"
    },
}

Step 4:

create craco.config.js at root

craco.config.js: 
module.exports = {
  style: {
    postcss: {
      plugins: [
        require('tailwindcss'),
        require('autoprefixer'),
      ],
    },
  },
}

Step 5:

npx tailwindcss-cli@latest init

Step 6:

// tailwind.config.js at root
  module.exports = {

   purge: [],

   purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
    darkMode: false, // or 'media' or 'class'
    theme: {
      extend: {},
    },
    variants: {
      extend: {},
    },
    plugins: [],
  }

Step 7:

/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
Posted by: Guest on October-20-2021
0

tailwind install

# using npm
npm i -D tailwind-styled-components

# using yarn
yarn add -D tailwind-styled-components
Posted by: Guest on November-09-2021

Browse Popular Code Answers by Language