vercel-composition-patterns

Refactor React UIs with variant components and provider-based state lifting.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/pau-vega/react-router-drizzle --skill vercel-composition-patterns-pau-vega
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/pau-vega/react-router-drizzle/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/pau-vega/react-router-drizzle --skill vercel-composition-patterns-pau-vega

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Address boolean prop proliferation and rigid UI coupling in React by promoting scalable composition patterns that enable reusability and maintainability.

Core Features & Use Cases

  • Use explicit variant components to replace boolean flags and clarify UI variants.
  • Build flexible APIs with compound components and shared context, enabling UI composition across providers.
  • Lift state into providers to allow cross-component access without prop drilling and to decouple UI from state implementation.

Quick Start

Create a Provider-based composer and assemble Frame, Input, and Submit subcomponents to scale your React architecture.

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 React components?

You can eliminate boolean prop proliferation in React by replacing flags with explicit variant components, enabling clearer UI variants and decoupling rigid component structures.

What is the best way to lift state in React without prop drilling?

The best way to lift state without prop drilling is using a generic context interface and provider-based state lifting to allow cross-component access while decoupling UI from state implementation.

How do I build flexible APIs with compound components and shared context?

Build flexible APIs with compound components by assembling Frame, Input, and Submit subcomponents around a provider-based composer, enabling scalable UI composition across shared context providers.

Does this React composition approach work with React 19 APIs?

Yes, these React composition patterns are designed with compatibility for React 19 APIs, ensuring that context providers and compound components function correctly with the latest React version.

When should I use explicit variant components instead of boolean flags?

Use explicit variant components instead of boolean flags when refactoring component libraries or building flexible APIs, as they clarify UI variants and prevent rigid UI coupling.