vercel-composition-patterns

Guide React component composition with compound components and context providers.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/sevenbelowllc/sevenbelow-resources --skill vercel-composition-patterns-sevenbelowllc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/sevenbelowllc/sevenbelow-resources/tree/main/claude-setups/compliance-os-project-v1/compliance-ui/.claude/skills/vercel-composition-patterns
Command: npx skills add https://github.com/sevenbelowllc/sevenbelow-resources --skill vercel-composition-patterns-sevenbelowllc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity and maintainability issues in React component development, particularly those arising from excessive boolean props and difficult state management.

Core Features & Use Cases

  • Component Architecture: Guides on avoiding boolean prop proliferation and utilizing compound components for better structure.
  • State Management: Strategies for decoupling state logic, defining generic context interfaces, and lifting state into providers.
  • Implementation Patterns: Best practices for creating explicit component variants and preferring children composition over render props.
  • Use Case: Refactor a large, monolithic Card component that has dozens of props like isLarge, isHoverable, showIcon, iconPosition, etc., into a more composable structure using compound components and explicit variants.

Quick Start

Apply the vercel-composition-patterns skill to refactor the UserProfileCard component to use compound components and avoid boolean props.

Frequently Asked Questions about vercel-composition-patterns

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

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

You can avoid boolean prop proliferation by refactoring monolithic components into compound components and adopting explicit component variants. This approach simplifies conditional rendering logic and improves maintainability.

What is the best way to manage state in compound components?

Managing state in compound components involves decoupling state logic and lifting it into context providers. Defining generic context interfaces ensures shared state is handled cleanly without excessive prop drilling.

How do compound components improve React component architecture?

Compound components improve React component architecture by breaking down large, monolithic structures with dozens of props into composable pieces. This structure replaces complex boolean logic with explicit component variants.

Should I use children composition or render props for React components?

For React components, prefer children composition over render props. This pattern provides a cleaner API for building scalable components and avoids the callback complexity associated with render props.

Does this React composition approach support React 19 API changes?

Yes, this React composition approach supports React 19 API changes. It includes specific best practices for handling the `use()` hook and updated ref handling mechanisms to ensure components remain scalable.