talwinder
v1.1.2
Published
A CLI tool to quickly set up Tailwind CSS in React + Vite projects
Maintainers
Readme
Talwinder 🎨
A simple CLI tool to quickly set up the latest version of Tailwind CSS in your React + Vite projects.
Usage
Simply run this command in your React + Vite project directory:
npx talwinderThat's it! The tool will automatically:
- ✅ Detect your package manager (npm, yarn, pnpm, or bun)
- ✅ Install the latest versions of
tailwindcss,postcss, andautoprefixer - ✅ Create
tailwind.config.jsandpostcss.config.js - ✅ Configure Tailwind with proper Vite + React paths
- ✅ Add Tailwind directives to your index.css file
Features
- 🚀 Quick Setup: One command to get Tailwind CSS running
- 📦 Smart Package Manager Detection: Automatically uses your project's package manager
- 🎯 Vite Optimized: Configures paths for React + Vite projects
- 🔍 Intelligent CSS Detection: Finds and updates your CSS file automatically
- ✨ Latest Versions: Always installs the newest Tailwind CSS version
Requirements
- Node.js 14.0.0 or higher
- An existing React + Vite project
What Gets Installed
tailwindcss@latestpostcss@latestautoprefixer@latest
Configuration
The tool creates a tailwind.config.js file with paths configured for Vite + React:
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}And adds these directives to your index.css:
@tailwind base;
@tailwind components;
@tailwind utilities;After Installation
- Make sure your
index.cssfile is imported in yourmain.jsxormain.tsxfile - Start using Tailwind utility classes in your components
- Run your development server
Example
# Create a new Vite + React app
npm create vite@latest my-app -- --template react
cd my-app
# Set up Tailwind CSS
npx talwinder
# Start developing
npm run devLicense
MIT
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
