compound-pattern

Official

Coordinate UI components with shared state

AuthorPatternsDev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Build UI components that coordinate behavior and share state without deep prop drilling, enabling cleaner and more maintainable interfaces such as tabs, menus, and dropdowns.

Core Features & Use Cases

  • Use React Context API to share state between a parent component and its children
  • Attach child components as static properties on the parent (e.g., FlyOut.Toggle, FlyOut.List, FlyOut.Item)
  • Memoize context values to avoid unnecessary re-renders in complex layouts
  • Support both explicit subcomponents and React.Children-based composition for flexible APIs

Quick Start

Create a FlyOut component with nested subcomponents (Toggle, List, Item) to coordinate UI state across related elements

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: compound-pattern
Download link: https://github.com/PatternsDev/skills/archive/main.zip#compound-pattern

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.