vercel-composition-patterns

Standardize React component composition with explicit variants and compound components.

4|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/allthingslinux/portal --skill vercel-composition-patterns-allthingslinux
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/allthingslinux/portal/tree/main/.cursor/skills/vercel-composition-patterns
Command: npx skills add https://github.com/allthingslinux/portal --skill vercel-composition-patterns-allthingslinux

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes React component composition to reduce boolean prop explosion and to promote reusable APIs through explicit variants and compound components.

Core Features & Use Cases

  • Explicit Variant Patterns: build ThreadComposer, EditMessageComposer, and ForwardMessageComposer to make architectures self-describing.
  • Compound Components with Shared Context: avoid prop drilling by composing components inside a shared context.
  • State Management via Providers: lift and share state across UI components using provider-based patterns.

Quick Start

Use the vercel-composition-patterns skill to refactor a React component library to adopt 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 fix boolean prop explosion in React components?

Fix boolean prop explosion in React components by standardizing component composition using explicit variant components like ThreadComposer instead of overloaded boolean props.

What is the best way to avoid prop drilling in a React component library?

The best way to avoid prop drilling in a React component library is implementing compound components with shared context to manage state cleanly.

How do I refactor a React component to use explicit variants?

Refactor a React component to use explicit variants by replacing conditional boolean logic with self-describing architectures such as EditMessageComposer and ForwardMessageComposer.

Does this React composition approach work with TypeScript?

Yes, this React composition approach works with TypeScript, enforcing consistent architecture and provider-based state management within a TypeScript React codebase.

When should I use compound components instead of standard React props?

Use compound components instead of standard React props when you need to lift and share state across UI components using provider-based patterns to ensure reusable APIs.