TailwindCSS & PostCSS Setup

TailwindCSS requires a few modules. These can be autogenerated using: npx tailwindcss init -p. Configs are below

Install Packages: yarn add -D tailwindcss postcss autoprefixer

tailwind.config.js


module.exports = {
  purge: ["./src/**/*.{js,jsx,ts,tsx}"],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {
      colors: {
       // Add any custom colors here
      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [],
}


postcss.config.js


module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}