Tailwind css tutorial Hindi #1 What is Tailwind CSS and Course Introduction
Why This course?
Cover all topics Tailwind CSS
Code on GitHub
Interview Question
Examples
Project development
Step by step guide
Your Questions' Answer in shorts
What is Tailwind CSS.?
Tailwind CSS is a utility-first CSS framework where you style your HTML by adding small, ready-made classes like bg-blue-500, text-centre, p-4 instead of writing separate CSS files.
- CSS Framework.: - Ready for modern web designs using utility classes.
- Almost no need to write different CSS: - You rarely write your own styles.
- A-lot of available classes for style. - Lots of choices for styling right from HTML.
- Every class has work for single utility.:- Every class does one simple thing, like “bg-blue-500” for background color.
- No Need to override css. No fighting with existing styles—just use what you need.
- Fast development. Build layouts and prototypes much quicker.
- Fast Performance. Unused styles are removed, making your final CSS super lightweight and fast-loading
Better than other CSS frameworks?
Tailwind CSS can be better than other frameworks if your requirement is fast development, high performance, and a lot of customization. However, no CSS framework is the “best” for every situation—it truly depends on your project’s needs, team experience, and the type of website you are building
- Its completely depends on the requirements - what you want to build and how much flexibility you need.
- No Framework is best until we do not know the requirements
- But For performance and customisations, and saving time this is the one of the best frameworks.
For fast performance and easy customization, Tailwind CSS is one of the most popular and efficient frameworks, especially for projects where design needs to be unique and you want to avoid heavy CSS files.
If you like quick layout building, minimal custom CSS, and want highly responsive sites, Tailwind is a top choice.
Other frameworks like Bootstrap or Foundation are sometimes better for basic sites or when you need lots of pre-designed UI components.
How we will learn it
• Setup (CND, with Node and NPM)
• Basics
• Basic Page Development
• Customizing Tailwind
• Responsive UI
• Task and Project
• Interview question
• Tailwind with React and angular
Prerequisite for Tailwind CSS
• Just Basic Understanding of HTML and CSS
Install Node.js, then Composer globally: composer global require laravel/installer. Create project with laravel new my-app (pick React kit), cd my-app, npm install && npm run dev.
Open VS Code, run php artisan serve—your Tailwind-styled app loads at localhost:8000 with login pages ready.
Basics
Understand folder structure: Laravel backend in app/Http, React in resources/js/Pages (like Auth/Login.tsx), Tailwind in resources/css/app.css with @tailwind base; @tailwind components; @tailwind utilities;.
Key files: app.tsx (main React entry), tailwind.config.js for custom colors/fonts.
Practice by editing resources/js/Pages/Dashboard.tsx—add <div className="p-8 bg-blue-100">Hello Tailwind!</div> and see live changes with npm run dev.
Basic Page Development
Create a new page: Add route in routes/web.php (Route::inertia('/about', 'About');), make resources/js/Pages/About.tsx with Tailwind: <div className="min-h-screen bg-gradient-to-r from-purple-400 to-pink-500 flex items-center justify-center"><h1 className="text-4xl font-bold text-white">About Page</h1></div>.
Inertia auto-handles navigation—no API calls needed.
Customizing Tailwind
Edit tailwind.config.js: Add colors like theme: { extend: { colors: { primary: '#3B82F6' } } }, then use bg-primary p-6 in JSX.
Create custom components: npx shadcn@latest add card, import <Card className="max-w-md mx-auto mt-10"> for styled boxes.
Responsive UI
Tailwind's mobile-first: Use sm:text-lg md:text-xl lg:text-2xl for text scaling, flex flex-col md:flex-row for layouts that stack on phone but side-by-side on desktop.
Test with browser dev tools (toggle device sizes)—add dark:bg-gray-800 dark:text-white for dark mode toggle.
Tasks and Projects
Task 1: Style login form with input:border-2 border-gray-300 focus:border-blue-500 rounded-lg px-4 py-2.
Task 2: Build dashboard cards grid: grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6.
Project: Todo app—add form, list with hover:bg-gray-50 transition-all, delete buttons.