tailwind-design-system

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

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/Dhruv-Ghanchi/Portfolio-Webiste --skill tailwind-design-system-dhruv-ghanchi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-design-system
Source: https://github.com/Dhruv-Ghanchi/Portfolio-Webiste/tree/main/.agents/skills/tailwind-design-system
Command: npx skills add https://github.com/Dhruv-Ghanchi/Portfolio-Webiste --skill tailwind-design-system-dhruv-ghanchi

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Teams building UI with Tailwind CSS v4 need consistent design tokens, reusable component variants, and correct dark mode and animation patterns, but v4's CSS-first configuration differs significantly from v3 and is easy to misconfigure. ## Core Features & Use Cases - CSS-first theming: Define semantic color, radius, and animation tokens with @theme, OKLCH colors, and @custom-variant dark mode instead of tailwind.config.ts. - Component patterns: Ready-to-use CVA-based Button, Card, Input, Grid, and Dialog components written for React 19 without forwardRef. - Migration guidance: A v3-to-v4 checklist covering directives, dark mode, keyframes, and custom @utility definitions. - Use Case: When scaffolding a new Next.js component library, apply the provided @theme token setup and CVA component patterns to get consistent light/dark theming and accessible form controls immediately. ## Quick Start Ask the assistant to set up a Tailwind CSS v4 design system with semantic color tokens, dark mode, and a CVA-based Button component for your 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: import Tailwind with `@import "tailwindcss"` and define tokens inside an `@theme` block, such as `--color-primary: oklch(45% 0.2 260)`. Colors, radii, animations, and container sizes all become utilities from these variables.

How to set up dark mode in Tailwind CSS v4?

Define a custom variant with `@custom-variant dark (&:where(.dark, .dark *))` and override token values inside a `.dark` class block. A React ThemeProvider toggles the class on the root element and persists the choice in localStorage.

What changed migrating from Tailwind v3 to v4?

Replace `tailwind.config.ts` with `@theme` blocks, swap `@tailwind` directives for `@import "tailwindcss"`, move keyframes inside `@theme`, replace the tailwindcss-animate plugin with native CSS animations, and use `size-*` utilities instead of separate width and height.

Does Tailwind v4 work with React 19 components?

Yes. React 19 passes ref as a regular prop, so components no longer need `forwardRef`. The patterns combine ref props with CVA variants and the `cn` utility built from clsx and tailwind-merge.

When should I use @utility instead of component classes?

Use `@utility` for reusable CSS utilities like text gradients or decorative lines that should behave like native Tailwind classes. Use CVA component variants when styles map to props such as size or variant on a React component.