Tiny project to become familiar with TailwindCSS
Run the following commends in your terminal:
- npm create vite@latest myprojectname -- --template react
- cd myprojectname
- npm install -D tailwindcss postcss autoprefixer
- npx tailwindcss init -p (this generates the Configuration Files)
configure the paths to all of your HTML templates:
5. Add "./index.html" and "./src/**/*.{js,ts,jsx,tsx}" to the content array in your tailwind.config.js file
For adding special functionality and customization:
6. Add the Tailwind Directives, @tailwind base, @tailwind components and @tailwind utilities to Your index.css file
Start your server:
7. Run your Vite server with the npm run dev command
View app in your browser:
8. Hold the ctrl key and click on the link at Local