tailwind-design-system

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

1|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill tailwind-design-system-hamzaoui-louai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-design-system
Source: https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend/tree/main/.opencode/skills/tailwind-design-system
Command: npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill tailwind-design-system-hamzaoui-louai

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 accessibility patterns, which is error-prone when done ad hoc. ## Core Features & Use Cases - Design Token Architecture: Set up semantic color tokens with CSS variables and HSL values supporting light and dark themes. - Component Patterns: Implement CVA-based variant components, compound components like Card, accessible form inputs, and responsive grid systems. - Theming & Animation: Configure class-based dark mode with a ThemeProvider and apply tailwindcss-animate utilities for dialogs and dropdowns. - Use Case: When scaffolding a React component library, use this Skill to generate a Button component with typed variants, a dark-mode-ready token setup, and accessible form controls. ## Quick Start Use the tailwind-design-system skill to create a themed Button component with CVA variants and dark mode support.

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 Button component with variants in Tailwind CSS?

Use class-variance-authority (CVA) to define base styles plus variant and size options, then merge classes with a cn utility built on clsx and tailwind-merge. This gives type-safe props like variant="destructive" and size="lg" on a forwardRef component.

How to set up dark mode with Tailwind CSS and React?

Configure darkMode: 'class' in tailwind.config, define dark theme CSS variables under a .dark selector, and use a ThemeProvider that toggles the class on the document root. Persist the choice in localStorage and support system preference via prefers-color-scheme.

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

Semantic tokens like primary or destructive map to CSS variables and describe purpose, while utilities like blue-500 hardcode specific colors. Semantic tokens enable runtime theming and consistent dark mode without changing component code.

Does this approach work with Radix UI primitives?

Yes, the patterns style Radix primitives such as Dialog using data-state attributes with tailwindcss-animate classes for enter and exit animations. Radix provides unstyled accessible behavior while Tailwind classes control all visual styling.

When should I not use CVA for Tailwind components?

Avoid CVA for one-off components with no variants, where simple conditional classes suffice. Also avoid it when a design system already provides a different variant API, since mixing approaches fragments component conventions.