vercel-composition-patterns

Refactor React component libraries using compound components and providers.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/rattamnoon/our-third-story --skill vercel-composition-patterns-rattamnoon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-composition-patterns
Source: https://github.com/rattamnoon/our-third-story/tree/main/.agents/skills/vercel-composition-patterns
Command: npx skills add https://github.com/rattamnoon/our-third-story --skill vercel-composition-patterns-rattamnoon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Refactors and architectures complex React component libraries by eliminating brittle boolean props and enabling flexible composition with compound components, context, and providers.

Core Features & Use Cases

  • Avoid boolean prop proliferation by using compound components and explicit variants.
  • Lift state into providers to enable sharing across UI fragments and outside of the main frame.
  • Build reusable APIs and consistent patterns for building scalable component libraries, with support for React 19 API changes.
  • Practical use cases include designing flexible UI kits, refactoring legacy components, and creating predictable composition-driven architectures.

Quick Start

Wrap your UI in a Provider and begin composing with Frame, Input, and Footer to bootstrap a scalable pattern library.

Frequently Asked Questions about vercel-composition-patterns

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

FAQPage Schema
How do I eliminate brittle boolean props in a large React component library?

Boolean prop proliferation is eliminated by refactoring React components into compound components and explicit variants, replacing complex conditional logic with predictable composition patterns for scalable UI development.

What is the best way to share state across UI fragments in React 19?

The best way to share state across UI fragments in React 19 is by lifting state into providers, enabling context-based state management that allows data sharing outside of the main component frame.

How do I refactor a legacy React codebase to use composition-driven architectures?

Refactor legacy React codebases to composition-driven architectures by wrapping your UI in a Provider and composing with modular elements like Frame, Input, and Footer to bootstrap a scalable pattern library.

Does this composition approach work for building a flexible UI kit?

Yes, this composition approach works for building flexible UI kits by providing reusable APIs and consistent patterns, allowing you to design scalable component libraries with context-based state management and explicit variants.

When should I not use compound components in React?

You should avoid compound components in React when the UI structure is highly static and simple, as the overhead of setting up providers and explicit variants provides little value without the need for flexible composition.