vercel-composition-patterns

Replace boolean props with explicit variants and compound components in React.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Composition patterns help reduce boolean prop proliferation and enable scalable, maintainable React UIs through compound components and provider-based state.

Core Features & Use Cases

  • Supports explicit component variants to replace boolean props
  • Enables compound components with shared context and dependency-injected state
  • Guides React 19 API usage and modern composition patterns for design systems

Quick Start

Start by replacing boolean props with explicit variant components and scoped providers to enable shared state across the UI.

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?

Reduce boolean prop proliferation in React components by replacing them with explicit variant components and scoped providers. This composition pattern enforces structured component architectures, avoiding unmanageable prop combinations and ensuring maintainable UI logic.

What is the compound components pattern in React for state management?

The compound components pattern in React manages shared state by grouping related sub-components through a shared context. This enables dependency-injected state, allowing individual components to access necessary data without prop drilling or deeply nested boolean logic.

How do I structure React design system components for scalability?

Structure React design system components for scalability by applying explicit variants, compound components, and provider-based state. These composition patterns ensure safe, maintainable UI libraries that reduce boolean prop complexity and support modern API usage.

Can I use dependency-injected state with React 19 composition patterns?

Yes, dependency-injected state works with React 19 composition patterns. The skill provides frontmatter-driven rules and example code guiding React 19 API usage, ensuring modern provider-based patterns and compound components integrate safely.

When should I use provider-based patterns instead of boolean props in React?

Use provider-based patterns instead of boolean props when component architectures scale beyond simple toggles. Providers enable shared context and dependency-injected state across refactors and design systems, preventing the unmanageable prop combinations that degrade UI maintainability.