vercel-composition-patterns

Refactor React component libraries by replacing boolean props with composition patterns.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/durancristhian/colore.ar --skill vercel-composition-patterns-durancristhian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/durancristhian/colore.ar/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/durancristhian/colore.ar --skill vercel-composition-patterns-durancristhian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams reduce UI complexity when refactoring components by replacing boolean flag props with structured composition patterns such as compound components, lifting state, and context-driven APIs, resulting in more maintainable React codebases.

Core Features & Use Cases

  • Explicit variants and compound components to avoid prop proliferation and hidden state.
  • Provider-based state management enabling UI components to be composed outside of a single frame and shared across siblings.
  • Guidance for React 19 API changes and designing robust, reusable component libraries.

Quick Start

Refactor a React component library to replace boolean props with explicit variant components and a provider-based state model.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I refactor React components to avoid boolean prop proliferation?

Refactor React components to avoid boolean prop proliferation by replacing flags with structured composition patterns. Using explicit variants, compound components, and context-driven APIs simplifies component architecture and results in more maintainable codebases.

What is the best way to manage shared state across sibling React components?

The best way to manage shared state across sibling React components is through provider-based state management. Lifting state into a context-driven UI component model allows siblings to compose outside a single frame without prop drilling.

How do compound components help scale a React UI library?

Compound components help scale a React UI library by enforcing explicit variants and avoiding hidden state. This composition-driven pattern creates robust, reusable APIs that prevent complexity from growing uncontrollably as the library expands.

Can I use context-driven composition patterns with React 19?

Yes, you can use context-driven composition patterns with React 19. The approach includes specific guidance for React 19 API changes, ensuring that provider-based state management and compound components remain compatible with the latest framework updates.

When should I replace boolean props with explicit variant components?

You should replace boolean props with explicit variant components when refactoring a React component library to reduce UI complexity. If hidden state and prop flags are making the API difficult to maintain, switching to composition-driven patterns is the right approach.