tailwind-design-system

Build component libraries and design tokens with Tailwind CSS v4 CSS-first configuration.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aashahin/ai-skills --skill tailwind-design-system-aashahin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tailwind-design-system
Source: https://github.com/aashahin/ai-skills/tree/main/tailwind-design-system
Command: npx skills add https://github.com/aashahin/ai-skills --skill tailwind-design-system-aashahin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tailwindcss, class-variance-authority, clsx, tailwind-merge, @radix-ui/react-slot, @radix-ui/react-dialog, react-hook-form, zod, lucide-react, and includes references (resource) components.

What problem does it solve? Setting up a consistent design system with Tailwind CSS v4 requires learning new CSS-first patterns like @theme, @custom-variant, and @utility, which differ significantly from v3's JavaScript config approach. This Skill provides ready-to-use token definitions, component patterns, and migration guidance so you avoid trial-and-error. ## Core Features & Use Cases - CSS-First Theme Configuration: Define semantic color tokens in OKLCH, radius scales, and animation keyframes inside @theme blocks, with dark mode via @custom-variant. - Component Patterns: Implement CVA-based Button variants, compound Card components, accessible form inputs with error states, and responsive Grid/Container layouts for React 19. - Advanced Patterns: Native CSS animations with @starting-style, ThemeProvider with localStorage persistence, custom @utility directives, and a complete v3-to-v4 migration checklist. - Use Case: When building a new component library, apply the provided @theme token structure and CVA button pattern to get a dark-mode-ready, accessible UI foundation without writing configuration from scratch. ## Quick Start Set up a Tailwind v4 design system with semantic color tokens, dark mode support, and a CVA-based Button component in my React project.

Frequently Asked Questions about tailwind-design-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Tailwind CSS v4 without tailwind.config.ts?▼

Tailwind v4 uses CSS-first configuration with @theme blocks instead of tailwind.config.ts. Define tokens like --color-primary and --radius-md inside @theme in your CSS file, and replace @tailwind directives with a single @import "tailwindcss" statement.

How to set up dark mode in Tailwind CSS v4?▼

Use @custom-variant dark (&:where(.dark, .dark *)) to enable class-based dark mode, then override your CSS variables inside a .dark selector. A ThemeProvider component can toggle the class on the root element with localStorage persistence and prefers-color-scheme detection.

What changed migrating from Tailwind v3 to v4?▼

Key changes include replacing tailwind.config.ts with @theme blocks, @tailwind directives with @import "tailwindcss", darkMode config with @custom-variant, and tailwindcss-animate with native CSS keyframes. React 19 also removes the need for forwardRef since ref is passed as a regular prop.

Does Tailwind v4 support custom utility classes?▼

Yes, Tailwind v4 introduces the @utility directive for defining reusable custom utilities directly in CSS. You can compose existing utilities with @apply inside @utility blocks, replacing many use cases that previously required custom plugins.

Why use OKLCH colors instead of HSL in design tokens?▼

OKLCH provides better perceptual uniformity than HSL, meaning equal numeric changes produce visually consistent color shifts across hues. Define OKLCH values directly in @theme tokens, and use color-mix() in oklab to generate semi-transparent variants.

How do I create type-safe component variants with Tailwind?▼

Use class-variance-authority (CVA) to define base styles plus variant and size options as a typed configuration object. Combine it with a cn() utility built on clsx and tailwind-merge to merge classes safely without conflicts.