tailwind-design-system

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Setting up a consistent, scalable design system with Tailwind CSS v4 requires learning new CSS-first configuration patterns, design token hierarchies, and component architecture that differ significantly from v3, leading to inconsistent UI patterns and migration mistakes. ## Core Features & Use Cases - CSS-First Configuration: Define design tokens with @theme, OKLCH semantic colors, radius scales, and animation keyframes directly in CSS instead of tailwind.config.ts. - Component Patterns: Implement CVA-based variant components, compound components for React 19 (no forwardRef), accessible form components with error states, and responsive grid/container systems. - Dark Mode & Animations: Set up class-based dark mode with @custom-variant, native CSS animations with @starting-style, and theme persistence via localStorage. - Use Case: When building a React component library, use this Skill to generate a Button component with variant/size props, a Card compound component, and a complete light/dark theme token set ready for production. ## Quick Start Create a Tailwind v4 design system with semantic color tokens, dark mode support, and a Button component with variants.

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 the @theme directive in your CSS file. Replace @tailwind directives with @import "tailwindcss" and define tokens like --color-primary directly inside @theme blocks.

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

Use @custom-variant dark (&:where(.dark, .dark *)) to enable class-based dark mode in v4. Then override your CSS variables inside a .dark selector and toggle the class on the root element with a ThemeProvider.

What changed from Tailwind v3 to v4?▼

Key changes include @theme replacing tailwind.config.ts, @import "tailwindcss" replacing @tailwind directives, @custom-variant for dark mode, and CSS @keyframes inside @theme replacing animation plugins. The skill includes a full 10-item migration checklist.

Does React 19 still need forwardRef for components?▼

No, React 19 treats ref as a regular prop, so forwardRef is no longer needed. Component patterns in this skill accept ref directly as an optional prop typed as React.Ref<HTMLElement>.

How do I create button variants with Tailwind and CVA?▼

Use class-variance-authority to define base styles plus variant and size options with defaultVariants. Combine with a cn() utility built from clsx and tailwind-merge to merge classes safely when consumers pass custom className values.