Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Implement and maintain Tailwind CSS design systems within a multi-agent Claude Code plugin ecosystem
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: tailwind-design-system3description: Build scalable design systems with Tailwind CSS v4, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.4---56# Tailwind Design System (v4)78Build production-ready design systems with Tailwind CSS v4, including CSS-first configuration, design tokens, component variants, responsive patterns, and accessibility.910> **Note**: This skill targets Tailwind CSS v4 (2024+). For v3 projects, refer to the [upgrade guide](https://tailwindcss.com/docs/upgrade-guide).1112## When to Use This Skill1314- Creating a component library with Tailwind v415- Implementing design tokens and theming with CSS-first configuration16- Building responsive and accessible components17- Standardizing UI patterns across a codebase18- Migrating from Tailwind v3 to v419- Setting up dark mode with native CSS features2021## Key v4 Changes2223| v3 Pattern | v4 Pattern |24| ------------------------------------- | --------------------------------------------------------------------- |25| `tailwind.config.ts` | `@theme` in CSS |26| `@tailwind base/components/utilities` | `@import "tailwindcss"` |27| `darkMode: "class"` | `@custom-variant dark (&:where(.dark, .dark *))` |28| `theme.extend.colors` | `@theme { --color-*: value }` |29| `require("tailwindcss-animate")` | CSS `@keyframes` in `@theme` + `@starting-style` for entry animations |3031## Quick Start3233```css34/* app.css - Tailwind v4 CSS-first configuration */35@import "tailwindcss";3637/* Define your theme with @theme */38@theme {39/* Semantic color tokens using OKLCH for better color perception */40--color-background: oklch(100% 0 0);41--color-foreground: oklch(14.5% 0.025 264);4243--color-primary: oklch(14.5% 0.025 264);44--color-primary-foreground: oklch(98% 0.01 264);4546--color-secondary: oklch(96% 0.01 264);47--color-secondary-foreground: oklch(14.5% 0.025 264);4849--color-muted: oklch(96% 0.01 264);50--color-muted-foreground: oklch(46% 0.02 264);5152--color-accent: oklch(96% 0.01 264);53--color-accent-foreground: oklch(14.5% 0.025 264);5455--color-destructive: oklch(53% 0.22 27);56--color-destructive-foreground: oklch(98% 0.01 264);5758--color-border: oklch(91% 0.01 264);59--color-ring: oklch(14.5% 0.025 264);6061--color-card: oklch(100% 0 0);62--color-card-foreground: oklch(14.5% 0.025 264);6364/* Ring offset for focus states */65--color-ring-offset: oklch(100% 0 0);6667/* Radius tokens */68--radius-sm: 0.25rem;69--radius-md: 0.375rem;70--radius-lg: 0.5rem;71--radius-xl: 0.75rem;7273/* Animation tokens - keyframes inside @theme are output when referenced by --animate-* variables */74--animate-fade-in: fade-in 0.2s ease-out;75--animate-fade-out: fade-out 0.2s ease-in;76--animate-slide-in: slide-in 0.3s ease-out;77--animate-slide-out: slide-out 0.3s ease-in;7879@keyframes fade-in {80from {81opacity: 0;82}83to {84opacity: 1;85}86}8788@keyframes fade-out {89from {90opacity: 1;91}92to {93opacity: 0;94}95}9697@keyframes slide-in {98from {99transform: translateY(-0.5rem);100opacity: 0;101}102to {103transform: translateY(0);104opacity: 1;105}106}107108@keyframes slide-out {109from {110transform: translateY(0);111opacity: 1;112}113to {114transform: translateY(-0.5rem);115opacity: 0;116}117}118}119120/* Dark mode variant - use @custom-variant for class-based dark mode */121@custom-variant dark (&:where(.dark, .dark *));122123/* Dark mode theme overrides */124.dark {125--color-background: oklch(14.5% 0.025 264);126--color-foreground: oklch(98% 0.01 264);127128--color-primary: oklch(98% 0.01 264);129--color-primary-foreground: oklch(14.5% 0.025 264);130131--color-secondary: oklch(22% 0.02 264);132--color-secondary-foreground: oklch(98% 0.01 264);133134--color-muted: oklch(22% 0.02 264);135--color-muted-foreground: oklch(65% 0.02 264);136137--color-accent: oklch(22% 0.02 264);138--color-accent-foreground: oklch(98% 0.01 264);139140--color-destructive: oklch(42% 0.15 27);141--color-destructive-foreground: oklch(98% 0.01 264);142143--color-border: oklch(22% 0.02 264);144--color-ring: oklch(83% 0.02 264);145146--color-card: oklch(14.5% 0.025 264);147--color-card-foreground: oklch(98% 0.01 264);148149--color-ring-offset: oklch(14.5% 0.025 264);150}151152/* Base styles */153@layer base {154* {155@apply border-border;156}157158body {159@apply bg-background text-foreground antialiased;160}161}162```163164## Core Concepts165166### 1. Design Token Hierarchy167168```169Brand Tokens (abstract)170└── Semantic Tokens (purpose)171└── Component Tokens (specific)172173Example:174oklch(45% 0.2 260) → --color-primary → bg-primary175```176177### 2. Component Architecture178179```180Base styles → Variants → Sizes → States → Overrides181```182183## Detailed patterns and worked examples184185Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.186187