Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

tailwindcss

БесплатноБез исполняемых скриптовНе проверен

Tailwind CSS utility framework. Covers utility classes, responsive design, and customization. Use for styling web applications. USE WHEN: user mentions…

claude-dev-suiteот claude-dev-suite★ 51 звезда на GitHub

Об этом скилле

Tailwind CSS Core Knowledge

Deep Knowledge: Use mcp__documentation__fetch_docs with technology: tailwindcss for comprehensive documentation.

Common Utilities

<!-- Layout -->
<div class="flex items-center justify-between gap-4">
<div class="grid grid-cols-3 gap-4">
<div class="container mx-auto px-4">

<!-- Spacing -->
<div class="p-4 m-2 space-y-4">
<div class="px-4 py-2 mt-8 mb-4">

<!-- Sizing -->
<div class="w-full h-screen max-w-md min-h-[200px]">

<!-- Typography -->
<p class="text-lg font-semibold text-gray-900">
<p class="text-sm text-gray-500 leading-relaxed">

<!-- Colors -->
<div class="bg-blue-500 text-white border-gray-200">
<div class="bg-gradient-to-r from-blue-500 to-purple-500">

Responsive Design

<!-- Mobile-first breakpoints -->
<div class="text-sm md:text-base lg:text-lg">
<div class="flex-col md:flex-row">
<div class="hidden lg:block">

<!-- Breakpoints: sm(640) md(768) lg(1024) xl(1280) 2xl(1536) -->

States

<!-- Hover, Focus, Active -->
<button class="bg-blue-500 hover:bg-blue-600 active:bg-blue-700">
<input class="border focus:ring-2 focus:ring-blue-500 focus:border-blue-500">

<!-- Group hover -->
<div class="group">
  <span class="group-hover:text-blue-500">Text</span>
</div>

<!-- Dark mode -->
<div class="bg-white dark:bg-gray-900 text-gray-900 dark:text-white">

Components Pattern

<!-- Card -->
<div class="rounded-lg shadow-md bg-white p-6 hover:shadow-lg transition-shadow">

<!-- Button -->
<button class="px-4 py-2 rounded-md bg-blue-500 text-white font-medium
               hover:bg-blue-600 focus:outline-none focus:ring-2
               focus:ring-blue-500 focus:ring-offset-2
               disabled:opacity-50 disabled:cursor-not-allowed">

<!-- Input -->
<input class="w-full px-3 py-2 border border-gray-300 rounded-md
              focus:outline-none focus:ring-2 focus:ring-blue-500
              focus:border-transparent">

When NOT to Use This Skill

  • CSS-in-JS preferred - Use styled-components or Emotion
  • Traditional CSS workflow - Stick with SCSS/PostCSS
  • Component library projects - Material-UI, Ant Design have their own styling
  • Email templates - Inline styles required

Config

// tailwind.config.js
export default {
  content: ['./src/**/*.{js,ts,jsx,tsx}'],
  theme: {
    extend: {
      colors: { brand: '#1a73e8' },
      fontFamily: { sans: ['Inter', 'sans-serif'] }
    }
  },
  plugins: [require('@tailwindcss/forms')]
}

Anti-Patterns

Anti-Pattern Why It's Bad Correct Approach
Using arbitrary values everywhere Hard to maintain Define in theme config
Long className strings Hard to read Use cn() utility or component extraction
Not using content config Large CSS bundles Specify exact file paths
Inline @apply in HTML Defeats utility-first Use @apply in CSS or extract component
Ignoring purge warnings Unused CSS in production Fix content paths
Not using CSS variables Can't change dynamically Use CSS vars for themeable values

Quick Troubleshooting

Issue Cause Solution
Styles not applying Purge removed classes Add to safelist or fix content paths
Dark mode not working darkMode not set Set darkMode: 'class' in config
Custom colors not working Not in theme.extend Add to theme.extend.colors
Build size too large Including too many files Be specific in content patterns
Hover not working on touch Using :hover only Add focus states for accessibility
Class conflicts Multiple utility classes Use cn() with tailwind-merge

Production Readiness

Performance Optimization

// tailwind.config.js
export default {
  content: [
    './src/**/*.{js,ts,jsx,tsx}',
    // Be specific to avoid scanning node_modules
  ],
  theme: {
    extend: {},
  },
  // Remove unused utilities in production
  safelist: [
    // Only if dynamically generated
    { pattern: /bg-(red|green|blue)-(100|500)/ },
  ],
  // Disable unused core plugins
  corePlugins: {
    preflight: true,
    // container: false, // if not using
  },
};
// postcss.config.js
export default {
  plugins: {
    'tailwindcss/nesting': {},
    tailwindcss: {},
    autoprefixer: {},
    // Production only
    ...(process.env.NODE_ENV === 'production'
      ? { cssnano: { preset: 'default' } }
      : {}),
  },
};

Design System

// tailwind.config.js
export default {
  theme: {
    // Override defaults
    colors: {
      transparent: 'transparent',
      current: 'currentColor',
      white: '#ffffff',
      black: '#000000',
      // Brand colors
      primary: {
        50: '#eff6ff',
        100: '#dbeafe',
        500: '#3b82f6',
        600: '#2563eb',
        700: '#1d4ed8',
      },
      // Semantic colors
      success: '#22c55e',
      warning: '#f59e0b
Полный SKILL.md на GitHub

Установить tailwindcss в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob
Write
Edit

Вложенные файлы

quick-ref/responsive.mdquick-ref/utilities.md

FAQ

Что делает скилл tailwindcss?

Tailwind CSS utility framework. Covers utility classes, responsive design, and customization. Use for styling web applications. USE WHEN: user mentions "Tailwind", "utility CSS", "Tailwind classes", asks about "responsive design", "Tailwind config", "utility-first CSS" DO NOT USE FOR: CSS-in-JS (styled-components, emotion), CSS Modules only projects, traditional CSS/SCSS workflows, component libraries like Material-UI

Как установить скилл tailwindcss?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tailwindcss запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить tailwindcss с