TA

A guide for using Tailwind CSS utility classes and configuration for UI development.

Install

mkdir -p .claude/skills/tailwind && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10791" && unzip -o skill.zip -d .claude/skills/tailwind && rm skill.zip

Installs to .claude/skills/tailwind

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Apply Tailwind CSS utility-first styling, responsive design, and theming. Use when styling with Tailwind, building UI with utility classes, configuring tailwind.config, or when the user mentions Tailwind.
204 chars✓ has a “when” trigger
Beginner

Key capabilities

  • Apply utility classes
  • Configure theme tokens
  • Implement responsive design

How it works

It applies utility-first styling and theme tokens based on Tailwind CSS principles.

Inputs & outputs

You give it
Styling requirements
You get back
Tailwind utility classes

When to use tailwind

  • Apply utility classes for layout
  • Configure theme tokens
  • Implement responsive design components

About this skill

Tailwind CSS

When to Use

Apply this skill when writing or refactoring styles with Tailwind CSS: components, pages, layout, responsive behavior, dark mode, or Tailwind config.

Principles

  1. Utility-first: Prefer utility classes over custom CSS. Compose layout, spacing, typography, and colors from Tailwind classes.
  2. Design tokens: Use theme values (e.g. bg-primary, text-sm, rounded-lg) instead of arbitrary values unless the design explicitly requires a one-off value.
  3. Responsive: Use responsive prefixes (sm:, md:, lg:, xl:, 2xl:) for breakpoint-specific styles. Mobile-first: base classes for smallest viewport, then override up.
  4. Extract components sparingly: Prefer keeping utilities in the template. Use @apply only for repeated patterns (e.g. a shared button variant) and keep @apply lists short.

Common Patterns

Layout

  • Flex: flex, flex-col / flex-row, items-center, justify-between, gap-4, flex-1, flex-wrap.
  • Grid: grid, grid-cols-2, grid-cols-3, gap-4, col-span-2, place-items-center.
  • Spacing: p-4, px-6, py-2, m-auto, space-x-4 / space-y-2 (for gaps between siblings).

Typography

  • Size: text-xs through text-5xl, text-base (default).
  • Weight: font-normal, font-medium, font-semibold, font-bold.
  • Color: text-gray-900, text-white, text-inherit. Prefer semantic tokens if defined in theme.
  • Line height: leading-tight, leading-normal, leading-relaxed.

Colors and Backgrounds

  • Background: bg-white, bg-gray-100, bg-transparent.
  • Borders: border, border-gray-200, rounded-md, rounded-full.
  • Opacity: opacity-50, bg-black/10 (arbitrary opacity).

Interactivity and State

  • Hover/focus: hover:bg-gray-100, focus:ring-2, focus:outline-none, focus-visible:ring-2.
  • Disabled: disabled:opacity-50, disabled:pointer-events-none.
  • Transitions: transition, transition-colors, duration-200.

Dark Mode

  • Use dark: prefix when dark mode is enabled (e.g. dark:bg-gray-800, dark:text-gray-200).
  • Ensure sufficient contrast and test both modes.

Arbitrary Values

  • Use when theme doesn’t cover the value: w-[137px], top-[calc(100%-2rem)], bg-[#1a1a2e].
  • Prefer extending tailwind.config with named tokens for repeated values.

Config

  • Custom tokens: Add in theme.extend (e.g. colors, spacing, fontFamily, borderRadius) so they’re available as utilities.
  • Content paths: Ensure content in tailwind.config includes all template/component paths so classes are generated.
  • Plugins: Use official plugins (e.g. @tailwindcss/forms, @tailwindcss/typography) when needed; document any custom plugins.

What to Avoid

  • Long @apply chains; prefer utilities in markup or small, focused components.
  • Inline styles for things Tailwind can do (e.g. use w-4 h-4 instead of style={{ width: 16, height: 16 }} when possible).
  • Mixing unrelated spacing scales; stick to Tailwind’s spacing scale unless the design system defines another.

Example

// Card with responsive layout and hover
<div className="flex flex-col rounded-lg border border-gray-200 bg-white p-4 shadow-sm transition-shadow hover:shadow-md dark:border-gray-700 dark:bg-gray-800">
  <h2 className="text-lg font-semibold text-gray-900 dark:text-white">Title</h2>
  <p className="mt-2 text-sm text-gray-600 dark:text-gray-300">Description.</p>
  <div className="mt-4 flex gap-2">
    <button className="rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
      Primary
    </button>
    <button className="rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700">
      Secondary
    </button>
  </div>
</div>

When not to use it

  • Inline styles
  • Mixing spacing scales

Prerequisites

tailwind.config

Limitations

  • Requires correct content paths in config

How it compares

It promotes utility-first composition over custom CSS or inline styles.

Compared to similar skills

tailwind side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
tailwind (this skill)05moNo flagsBeginner
ui-styling129moReviewBeginner
tailwind-design-system342moNo flagsIntermediate
figma224moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

ui-styling

mrgoonie

Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.

12132

tailwind-design-system

wshobson

Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.

3495

figma

openai

Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.

2266

design-system-patterns

wshobson

Build scalable design systems with design tokens, theming infrastructure, and component architecture patterns. Use when creating design tokens, implementing theme switching, building component libraries, or establishing design system foundations.

1157

interaction-design

wshobson

Design and implement microinteractions, motion design, transitions, and user feedback patterns. Use when adding polish to UI interactions, implementing loading states, or creating delightful user experiences.

1550

web-design-reviewer

github

This skill enables visual inspection of websites running locally or remotely to identify and fix design issues. Triggers on requests like "review website design", "check the UI", "fix the layout", "find design problems". Detects issues with responsive design, accessibility, visual consistency, and layout breakage, then performs fixes at the source code level.

750

Search skills

Search the agent skills registry