
Tailwind Css
Build and style React components with Tailwind CSS utility classes
What You Can Do
You can write clean, maintainable Tailwind CSS directly in React JSX using utility-first principles. This skill helps you compose responsive layouts, implement dark mode themes, extract reusable component patterns, convert existing CSS to Tailwind, and troubleshoot Tailwind configuration issues. It's optimized for dashboards, forms, cards, modals, and other typical application interfaces.
Features
Write Tailwind classes directly in className attributes with proper formatting and line breaks for readability
Apply mobile-first breakpoints (sm:, md:, lg:, xl:) to create adaptive layouts
Configure and implement light/dark theme variants using Tailwind's dark mode utilities
Leverage theme scales for spacing, colors, and typography instead of arbitrary values
Identify when to extract markup into components vs. using @apply directives
Set up tailwind.config.js for v3.x and CSS imports for v4.x with custom theme values
Combine utilities with clsx, cva, and tailwind-merge for conditional and dynamic styling
Convert plain CSS or styled-components to Tailwind utility-based patterns
Example Output
Example 1: Responsive card component
<div className="bg-white dark:bg-slate-900 rounded-lg shadow-md p-4 sm:p-6 md:p-8">
<h2 className="text-lg sm:text-xl md:text-2xl font-bold text-slate-900 dark:text-white mb-2">
Card Title
</h2>
<p className="text-sm sm:text-base text-slate-600 dark:text-slate-300">
Description text here.
</p>
</div>
Example 2: Form input with validation states
const inputClasses = clsx(
'w-full px-3 py-2 border rounded-md text-sm',
'focus:outline-none focus:ring-2 focus:ring-offset-2 transition',
error
? 'border-red-500 focus:ring-red-500'
: 'border-slate-300 focus:ring-blue-500'
);
<input type="text" className={inputClasses} />
Example 3: Tailwind config with custom theme
module.exports = {
theme: {
extend: {
colors: {
brand: { 500: '#3b82f6', 600: '#2563eb' }
},
spacing: { '128': '32rem' }
}
}
}
What's Included
- SKILL.md: Complete Tailwind CSS styling instruction set with core principles, version detection, and best practices
- Responsive design checklist: Mobile-first breakpoint strategy and common responsive patterns
- Component composition guide: Decision framework for utilities vs. @apply vs. extracted components
- Dark mode setup template: Configuration and implementation patterns for light/dark themes
- Tailwind config examples: Starter configs for v3.x and v4.x with custom theme extensions
Who It's For
- React developers — Building component libraries and application UIs
- Frontend engineers — Implementing design systems with Tailwind tokens
- UI/UX engineers — Translating designs into responsive, maintainable styling
- Product designers coding their own prototypes — Creating interactive UI mockups
- Full-stack developers — Styling React components in Next.js and Vite projects
Best For
- Styling new React components from design specs
- Converting plain CSS or styled-components to Tailwind
- Building responsive layouts with mobile-first design
- Implementing light/dark mode themes
- Fixing broken Tailwind setups and configuration issues
- Organizing and refactoring long className strings
- Creating reusable component patterns and design systems







