vercel-composition-patterns

Refactor React component libraries to replace boolean props with explicit variants and compound components.

9|2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/hongmaple0820/agent-academy --skill vercel-composition-patterns-hongmaple0820
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/hongmaple0820/agent-academy/tree/main/skills/design/composition-patterns
Command: npx skills add https://github.com/hongmaple0820/agent-academy --skill vercel-composition-patterns-hongmaple0820

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactoring React component libraries to reduce boolean prop proliferation and promote scalable architectures through composition, compound components, and context-driven patterns.

Core Features & Use Cases

  • Avoid boolean prop proliferation by adopting explicit variants and compound components.
  • Lift state into providers to enable shared UI across components and modules.
  • Align with React 19 APIs and patterns for clean context usage and modular design.

Quick Start

Refactor an existing React component library to replace boolean props with explicit variants and compound components.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I reduce boolean prop proliferation in my React component library?

You can reduce boolean prop proliferation by adopting explicit variants and compound components, which promotes scalable architectures through composition and context-driven patterns.

What is the best way to structure scalable React composition patterns?

Scalable React composition patterns are structured by applying explicit variants, compound components, and context-driven UI patterns to build modular component libraries.

Does this React refactoring approach work with React 19 API changes?

Yes, this approach aligns with React 19 APIs and patterns for clean context usage and modular design, ensuring your refactored component architecture remains compatible with modern React updates.

When do I need to use compound components instead of explicit variants?

You need to use compound components when lifting state into providers to enable shared UI across components and modules, whereas explicit variants simply replace boolean props to distinguish visual appearances.

How to refactor an existing React component to use context-driven UI patterns?

You can refactor an existing React component to use context-driven UI patterns by lifting state into providers to enable shared UI across components and modules, aligning with React 19 APIs for clean context usage.