component-variants

Generate CVA-based multi-style UI components with Glass, Outline, and Flat variants.

22|3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/fusengine/agents --skill component-variants
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-variants
Source: https://github.com/fusengine/agents/tree/main/plugins/design-expert/skills/component-variants
Command: npx skills add https://github.com/fusengine/agents --skill component-variants

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of creating visually distinct and consistent styles for UI components, enabling easy switching between predefined aesthetics like Glass, Outline, and Flat.

Core Features & Use Cases

  • Multi-Style Components: Define and manage multiple visual styles for a single component.
  • Variant Props: Utilize class-variance-authority (CVA) for type-safe variant definitions.
  • Style Switching: Seamlessly apply different styles (Glass, Outline, Flat) based on props.
  • Use Case: When designing a button component that needs to appear as a primary action (flat), a secondary action (outline), or a visually striking element (glass), this Skill provides the structure to manage these variations efficiently.

Quick Start

Use the component-variants skill to generate a CVA for a card component with glass, outline, and flat variants.

Frequently Asked Questions about component-variants

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

FAQPage Schema
How do I manage multiple visual styles for a single React component?

Managing multiple visual styles for a React component involves defining type-safe variant props using class-variance-authority (CVA) to switch between aesthetics like Glass, Outline, and Flat. This approach ensures consistent styling across different component states and themes.

What is the best way to create glassmorphism and flat design variants in Tailwind CSS?

Creating glassmorphism and flat design variants in Tailwind CSS is done by utilizing class-variance-authority (CVA) to map visual styles to type-safe props. This method enforces consistent styling across different component states and themes, including dark mode.

How do I set up type-safe style switching for UI components in Next.js?

Type-safe style switching for UI components in Next.js is set up by generating CVA definitions that map variant props to predefined Tailwind CSS classes. This structure enables seamless application of Glass, Outline, and Flat aesthetics based on props.

Can I use class-variance-authority to handle dark mode and different component states?

Yes, you can use class-variance-authority to handle dark mode and different component states by enforcing consistent styling across predefined themes. It maps variant definitions to specific visual styles, ensuring type-safe props correctly apply styles.

Does this approach require any external dependencies to switch between glass and outline styles?

Switching between glass and outline styles requires integrating class-variance-authority (CVA) into your React or Next.js project to define the visual styles. It operates without additional listed dependencies, relying solely on CVA and Tailwind CSS.

Why use CVA for component variants instead of manually toggling Tailwind CSS classes?

Using CVA for component variants instead of manually toggling Tailwind CSS classes provides type-safe variant definitions and enforces consistent styling across different states. It structures multi-style components to seamlessly apply Glass, Outline, and Flat aesthetics without style conflicts.