fe-component

Generate React UI components with CVA variants and Radix UI primitives.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/lety-ai/lety-skill-hub --skill fe-component
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fe-component
Source: https://github.com/lety-ai/lety-skill-hub/tree/main/plugins/ui-component/skills/ui-component
Command: npx skills add https://github.com/lety-ai/lety-skill-hub --skill fe-component

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines creating consistent, accessible React UI components for the Lety 2.0 frontend, eliminating guesswork about placement, variants, and accessibility patterns.

Core Features & Use Cases

  • Atomic Design Guidance: Place components correctly as shared/ui atoms, shared/components composites, or feature-scoped components based on reuse.
  • Variant & Styling Conventions: Enforce CVA for visual variants and cn() for conditional class merging to keep Tailwind usage consistent.
  • Accessible Interactions: Recommend Radix UI primitives and Portal usage for interactive overlays and guidance on when to add the use client directive.
  • Developer Ergonomics: Require className merging, OpenAPI types for domain shapes, and anti-pattern checks to prevent common mistakes.

Quick Start

Use the fe-component skill to scaffold a shared/ui Button atom with CVA variants for size and intent, accept and merge className with cn(), and use Radix primitives and a client directive only if the component is interactive.

Frequently Asked Questions about fe-component

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

FAQPage Schema
How do I scaffold React UI components with CVA and Tailwind CSS?

Scaffold React UI components by applying CVA for visual variants and cn() for conditional class merging, keeping Tailwind CSS usage consistent across shared atoms and composites. This enforces variant-driven styling for accessible building blocks.

When do I need to mark a React component as a client component in Next.js?

Mark a React component as a client component only when it uses browser hooks or events. Non-interactive UI building blocks remain server components by default, while interactive overlays utilizing Radix UI primitives require the use client directive.

How do I structure React components using atomic design principles?

Structure React components by placing shared atoms in a shared/ui directory, composites in shared/components, and feature-scoped components based on reuse. This atomic design guidance ensures consistent placement of accessible UI building blocks.

Does this component scaffolding approach work with Radix UI and TypeScript?

Yes, this approach works with Radix UI and TypeScript by recommending Radix primitives for accessible interactions and Portal usage. It enforces accepting className on every component and applying OpenAPI types for domain shapes.

What is the best way to manage className merging for React UI components?

The best way to manage className merging is to require every component to accept a className prop and use the cn() utility for conditional class merging. This developer ergonomics pattern prevents styling conflicts and ensures component composability.