tailwind-cva-patterns

Enforce Tailwind patterns with mdt- prefix and CVA usage in components.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/PremModhaOfficial/motadata-ai-pipeline --skill tailwind-cva-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-cva-patterns
Source: https://github.com/PremModhaOfficial/motadata-ai-pipeline/tree/main/.claude/skills/tailwind-cva-patterns
Command: npx skills add https://github.com/PremModhaOfficial/motadata-ai-pipeline --skill tailwind-cva-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tailwind/CVA patterns standardize frontend styling to ensure consistent visuals and maintainable codebase by enforcing naming conventions, token usage, and reusable components.

Core Features & Use Cases

  • Standardized Tailwind utilities with mdt- prefix across components.
  • Class merging guidance using cn() to resolve conflicts and maintain readability.
  • Semantic color tokens usage to support theming and dark mode.
  • CVA pattern examples and best practices for reusable components in the Motadata frontend.
  • Use Case: When creating a new UI component, apply patterns to enforce consistency and reduce styling drift.

Quick Start

Start applying the Tailwind + CVA patterns to a new component to ensure consistent styling across the frontend.

Frequently Asked Questions about tailwind-cva-patterns

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

FAQPage Schema
How do I enforce consistent Tailwind and CVA patterns across UI components?

Enforce consistent Tailwind and CVA patterns by mandating the mdt- prefix on utility classes, using cn() for class merging, and applying semantic color tokens for theming. This ensures visual consistency and reduces styling drift across your frontend.

What is the best way to structure CVA variants for reusable frontend components?

Structure CVA variants by defining defaultVariants and responsive variants within your component configuration. Combine this with semantic tokens for colors and the cn() utility to resolve class conflicts and maintain accessible theming.

How does the cn() utility work with Tailwind class merging?

The cn() utility works with Tailwind by resolving conflicting classes during component implementation. It merges variant classes cleanly, maintaining code readability and ensuring the correct responsive utilities and styling overrides apply.

When do I need to use semantic tokens for colors in a Tailwind design system?

Use semantic tokens for colors in a Tailwind design system when supporting theming and dark mode. Token usage enforces standardized frontend styling, prevents hardcoded color drift, and ensures accessible visuals across all components.

Can I use my own Tailwind prefix with class-variance-authority?

The pattern requires a mandatory mdt- prefix on all Tailwind classes to enforce standardization. You must apply this prefix alongside CVA usage and cn() merging during component design and implementation.

Why does styling drift happen in frontend components and how can CVA prevent it?

Styling drift happens when naming conventions and token usage are inconsistent across components. CVA prevents it by enforcing reusable patterns, defaultVariants, and semantic tokens, ensuring maintainable codebase and consistent visuals.