From tailwind-css
TailwindCSS λ² μ€νΈ νλν°μ€ κ°μ΄λ. Tailwind CSSλ₯Ό μ¬μ©νμ¬ μ»΄ν¬λνΈ μ€νμΌλ§ ꡬν μ μ°Έμ‘°.
npx claudepluginhub window-ook/claude-code-lab --plugin tailwind-cssThis skill uses the workspace's default tool permissions.
**Version:** 4.1 (Jan 2026)
references/01-styling-with-utility-classes.mdreferences/02-hover-focus-and-other-states.mdreferences/03-responsive-design.mdreferences/04-dark-mode.mdreferences/05-theme-variables.mdreferences/06-colors.mdreferences/07-adding-custom-styles.mdreferences/08-detecting-classes-in-source-files.mdreferences/09-functions-and-directives.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Version: 4.1 (Jan 2026) Doc Source: Official Tailwind CSS documentation
Tailwind CSS v4λ₯Ό μ¬μ©ν μ€νμΌλ§ ꡬν μ λ² μ€νΈ νλν°μ€λ₯Ό μ μ©ν©λλ€. className μμ κ·μΉ, λμ ν΄λμ€ μ²λ¦¬, λ°μν λμμΈ, λ€ν¬ λͺ¨λ, ν λ§ μ»€μ€ν°λ§μ΄μ§ λ± Tailwind CSSμ ν΅μ¬ ν¨ν΄μ μ¬λ°λ₯΄κ² ꡬννλλ‘ μλ΄ν©λλ€.
// β WRONG - μμ μμ΄ μμ±
<div className="text-white flex bg-blue-500 p-4 absolute w-full">
// β
CORRECT - ν¬μ§μ
β λ μ΄μμ β 곡백 β μΈκ³½ β λ°°κ²½ β Flex/Grid β ν°νΈ
<div className="absolute w-full p-4 bg-blue-500 flex text-white">
| μμ | μ’ λ₯ | μμ± |
|---|---|---|
| 1 | ν¬μ§μ | absolute, relative, fixed, top, leftβ¦ |
| 2 | λ μ΄μμ | w-, h-, size-, min-w-[], min-h-[], overflow-hidden, β¦ |
| 3 | 곡백 | m-, mx-, my-, p, px-, py-⦠|
| 4 | μΈκ³½ ν¨κ³Ό | border-[], border-color-[], shadow-[]β¦ |
| 5 | λ°°κ²½μ | bg-, opacity- |
| 6 | Flex Box, Grid | flex, grid, flex-col, grid-cols-, gap-, justify-, items-β¦ |
| 7 | ν°νΈ | text-, font-, whitespace-, leading-, β¦ |
| 8 | μ λλ©μ΄μ | animate- |
| 9 | νΈλμ§μ | transition-, duration-, ease-β¦ |
| - | 쑰건 | hover:, group-hover:, focus: (ν΄λΉ μμ± λ°λ‘ λ€μ μμΉ) |
// β WRONG
<div className="w-10 h-10">
// β
CORRECT
<div className="size-10">
// β WRONG - λμ ν΄λμ€ μμ± λΆκ°
<div className={`text-${color}-500`}>
// β
CORRECT - μμ ν ν΄λμ€λͺ
λ§€ν
const colorMap = {
red: 'text-red-500',
blue: 'text-blue-500',
} as const;
<div className={colorMap[color]}>
!important Unless Absolutely Necessary// β AVOID
<div className="!text-red-500">
// β
CORRECT - ꡬ체μ μΈ μ
λ ν° λλ λ μ΄μ΄ μ¬μ©
<div className="text-red-500">
/* β
v4 λ°©μ - @themeμΌλ‘ λμμΈ ν ν° μ μ */
@import 'tailwindcss';
@theme {
--color-brand: #3b82f6;
--font-display: 'Inter', sans-serif;
}
// β WRONG - λ°λ³΅μ μΈ μ€νμΌ
<button className="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">
<button className="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">
// β
CORRECT - @applyλ‘ μ¬μ¬μ© κ°λ₯ν μ»΄ν¬λνΈ μ€νμΌ
// globals.css
@layer components {
.btn-primary {
@apply px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600;
}
}
| v3 (deprecated) | v4 (current) |
|---|---|
tailwind.config.js | @theme directive in CSS |
@tailwind base/components/utilities | @import "tailwindcss" |
theme.extend.colors | @theme { --color-* } |
darkMode: 'class' | @variant dark (&:where(.dark, .dark *)) |
content: [...] μ€μ | μλ κ°μ§ (.gitignore μΈ λͺ¨λ νμΌ) |
| PostCSS νλ¬κ·ΈμΈ νμ | Vite νλ¬κ·ΈμΈ κΆμ₯, PostCSS μ νμ |
// κΈ°λ³Έ μ νΈλ¦¬ν° μ‘°ν©
<div className="min-h-screen p-8 bg-gray-100 flex flex-col items-center gap-4">
<h1 className="text-3xl font-bold text-gray-900">Title</h1>
<p className="max-w-prose text-gray-600 leading-relaxed">Content</p>
</div>
// λͺ¨λ°μΌ νΌμ€νΈ λ°μν
<div className="w-full p-4 md:w-1/2 md:p-6 lg:w-1/3 lg:p-8">
<h2 className="text-lg md:text-xl lg:text-2xl">Responsive</h2>
</div>
// λ€ν¬ λͺ¨λ μ§μ
<div className="bg-white text-gray-900 dark:bg-gray-900 dark:text-white">
Dark mode aware content
</div>
Using utility classes? β references/01-styling-with-utility-classes.md
Using hover, focus states? β references/02-hover-focus-and-other-states.md
Building responsive layouts? β references/03-responsive-design.md
Implementing dark mode? β references/04-dark-mode.md
dark: λ³ν μ¬μ©λ²Customizing theme? β references/05-theme-variables.md
@theme λλ ν°λΈλ‘ λμμΈ ν ν° μ μUsing colors? β references/06-colors.md
bg-blue-500/50)currentColor)Adding custom styles? β references/07-adding-custom-styles.md
@theme 컀μ€ν°λ§μ΄μ§[κ°] λ¬Έλ²[property:value]@layer, @utility, @variant λλ ν°λΈ@applyλ‘ μ νΈλ¦¬ν° μΆμΆConfiguring class detection? β references/08-detecting-classes-in-source-files.md
@source λλ ν°λΈλ‘ λͺ
μμ κ²½λ‘ μ§μ Using functions & directives? β references/09-functions-and-directives.md
@import, @theme, @source@utility, @variant, @custom-variant@apply, @reference, @layer--alpha(), --spacing() ν¨μ