tailwindcss
БесплатноБез исполняемых скриптовНе проверенTailwind CSS is a utility-first CSS framework: you style pages with small classes in the markup and ship only the CSS you use. Covers Tailwind v4 (CSS-first…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Tailwind CSS — Utility-First CSS Framework
Overview
Tailwind CSS builds designs from single-purpose utility classes (flex, p-4, text-sm) written directly in HTML or JSX. The compiler scans your source files, generates only the classes it finds, and reads design tokens (colors, fonts, radii, breakpoints) from CSS variables declared in @theme. Since v4 there is no tailwind.config.js by default and no content list: configuration lives in your CSS file and class detection is automatic.
Instructions
Install (v4)
# Vite (recommended for Vite, SvelteKit, Astro, etc.)
npm install tailwindcss @tailwindcss/vite
# PostCSS (Next.js and others)
npm install tailwindcss @tailwindcss/postcss
# Standalone build with no bundler
npm install tailwindcss @tailwindcss/cli
// vite.config.ts
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({ plugins: [tailwindcss()] });
// postcss.config.mjs — PostCSS users (no postcss-import or autoprefixer needed)
export default { plugins: { "@tailwindcss/postcss": {} } };
/* src/app.css — replaces the three v3 @tailwind directives */
@import "tailwindcss";
For the CLI: npx @tailwindcss/cli -i src/app.css -o dist/app.css --watch. To move a v3 project, run npx @tailwindcss/upgrade on a new branch and review the diff.
Layout and Responsive
// Responsive card grid with flexbox/grid
function ProductGrid({ products }: { products: Product[] }) {
return (
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 p-4">
{products.map((product) => (
<div key={product.id}
className="group bg-white rounded-2xl shadow-xs border border-gray-100
hover:shadow-lg hover:border-gray-200 transition-all duration-300
overflow-hidden">
{/* Image with aspect ratio */}
<div className="aspect-[4/3] overflow-hidden">
<img src={product.image} alt={product.name}
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" />
</div>
{/* Content */}
<div className="p-4 space-y-2">
<div className="flex items-center justify-between">
<h3 className="font-semibold text-gray-900 truncate">{product.name}</h3>
<span className="text-lg font-bold text-emerald-600">${product.price}</span>
</div>
<p className="text-sm text-gray-500 line-clamp-2">{product.description}</p>
<div className="flex gap-2 pt-2">
{product.tags.map((tag) => (
<span key={tag} className="px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded-full">
{tag}
</span>
))}
</div>
</div>
</div>
))}
</div>
);
}
Dark Mode and Custom Theme
/* globals.css — Tailwind v4 */
@import "tailwindcss";
@theme {
--color-brand-50: #eff6ff;
--color-brand-500: #3b82f6;
--color-brand-600: #2563eb;
--color-brand-700: #1d4ed8;
--font-sans: "Inter", system-ui, sans-serif;
--font-mono: "JetBrains Mono", monospace;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
}
Theme variable names decide which utilities exist: --color-brand-500 gives bg-brand-500 and text-brand-500, --font-sans sets font-sans, --breakpoint-3xl adds a 3xl: variant. The v3 names --font-family-* are not recognized.
By default dark: follows prefers-color-scheme. To switch with a class (for a theme toggle), override the variant once in your CSS:
@custom-variant dark (&:where(.dark, .dark *));
// Dark mode — add the dark: prefix
function DashboardCard({ title, value, trend }: CardProps) {
return (
<div className="bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700">
<p className="text-sm text-gray-500 dark:text-gray-400">{title}</p>
<p className="text-3xl font-bold text-gray-900 dark:text-white mt-1">{value}</p>
<p className={`text-sm mt-2 ${trend > 0 ? "text-emerald-600" : "text-red-500"}`}>
{trend > 0 ? "↑" : "↓"} {Math.abs(trend)}%
</p>
</div>
);
}
Animations
// 4 built-in animations
<div className="animate-spin">...</div> // loading spinner
<div className="animate-ping">...</div> // notification dot
<div className="animate-pulse">...</div> // skeleton placeholder
<div className="animate-bounce">...</div> // scroll indicator
// Staggered bounce loader
function LoadingPulse() {
return (
<div className="flex gap-2">
<div className="w-3 h-3 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.3s]" />
<div className="w-3 h-3 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]" />
<div className="w-3 h-3 bg-blue-500 rounded-full animate-bounce" /
Установить tailwindcss в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл tailwindcss?
Tailwind CSS is a utility-first CSS framework: you style pages with small classes in the markup and ship only the CSS you use. Covers Tailwind v4 (CSS-first config with @theme, @import "tailwindcss", Vite and PostCSS plugins), responsive layouts, dark mode, custom animations, and the v3 to v4 renames. Use when someone asks to "style with Tailwind", "set up Tailwind v4", "upgrade Tailwind to v4", "add dark mode", or "fix Tailwind classes that stopped working".
Как установить скилл tailwindcss?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tailwindcss запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic