building-compound-components
Installation
SKILL.md
Building Compound Components
Create unstyled, composable React components following the Radix UI / Base UI pattern. Components expose behavior via context while consumers control rendering.
Project Rules
These rules are specific to this codebase and override general patterns.
Hooks Are Internal
Hooks are implementation details, not public API. Never export hooks from the index.
// index.tsx - CORRECT
export const Component = {
Root: ComponentRoot,
Content: ComponentContent,
};
export type { ComponentRootProps, ComponentContentRenderProps };