tailwind-design-system

Build Tailwind CSS design systems with design tokens, CVA component variants, and dark mode theming.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill tailwind-design-system-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-design-system
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/tailwind-design-system
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill tailwind-design-system-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a consistent, themeable component library with Tailwind CSS requires coordinating design tokens, variant systems, responsive layouts, and dark mode, which is error-prone when done ad hoc. This Skill provides proven patterns and ready-to-adapt code for creating a scalable design system. ## Core Features & Use Cases - Design Token Architecture: Set up semantic color tokens with CSS variables and HSL values, wired into tailwind.config.ts for runtime theming and dark mode. - Component Patterns: Implement CVA-based variant components (Button, Card, Input, Label), compound components, responsive Grid/Container systems, and animated Dialog overlays with Radix primitives. - Theming & Accessibility: Add a ThemeProvider with system/light/dark support, focus rings, ARIA attributes, and form validation integrated with React Hook Form and Zod. - Use Case: When starting a new Next.js app, use this Skill to scaffold a shadcn-style component library with semantic tokens, dark mode toggle, and accessible form components instead of assembling each pattern from scratch. ## Quick Start Ask the AI to set up a Tailwind design system with semantic color tokens, a CVA-based Button component, and dark mode support for your Next.js 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 create a Tailwind CSS component library with variants?

Use class-variance-authority (CVA) to define base styles plus variant and size options, then merge classes with a cn() utility combining clsx and tailwind-merge. Forward refs and extend VariantProps so consumers get type-safe props like variant="destructive" and size="lg".

How to implement dark mode in Tailwind CSS with CSS variables?

Set darkMode: 'class' in tailwind.config.ts, define HSL CSS variables for semantic colors on :root and .dark selectors, and toggle the class on the document root. A ThemeProvider with localStorage persistence and prefers-color-scheme detection handles system, light, and dark modes.

What is the difference between semantic tokens and Tailwind color utilities?

Semantic tokens like primary or destructive map to CSS variables and express purpose, while utilities like blue-500 hardcode specific colors. Semantic tokens enable runtime theming and dark mode without changing component code, whereas hardcoded utilities require edits across the codebase.

Does this approach work with Next.js and React Hook Form?

Yes, the patterns target React and Next.js, including client components with 'use client' for the ThemeProvider. Form components integrate with React Hook Form and Zod resolvers, passing validation errors to Input components with aria-invalid and role="alert" messaging.

Why should I avoid arbitrary values and @apply in Tailwind?

Arbitrary values bypass the design token system and break consistency, so extend the theme configuration instead. Nesting @apply hurts readability and duplicates utility logic; composing classes with CVA and cn() keeps variants explicit and type-safe.