Skip to content

Simple template, for using tailwind css with react.js using carco

License

Notifications You must be signed in to change notification settings

apoorvcodes/react-tailwind-starter

Repository files navigation

React Tailwind Starter

react+tailwind

Setup 💻

git clone https://github.com/apoorvcodes/react-tailwind-starter/

cd project-path

yarn start

Custimization

Tailwind Config

module.exports = {
 purge: [],
 darkMode: false, // or 'media' or 'class'
 theme: {
   extend: {},
 },
 variants: {
   extend: {},
 },
 plugins: [],
}

Note : You can add this config to remove unused stylings for better performance

purge: ["/src/**/*.{js,jsx,ts,tsx}', './public/index.html"] 

Carco Config

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

You can add more plugins read here Carco Docs

happy coding