What problem does it solve?
React components often become hard to reuse because of ambiguous props, leaked implementation details, and mixed presentation with behavior. This Skill provides concrete guidelines so new components stay isolatable, composable, and type-safe.
Core Features & Use Cases
- Minimal Prop Interfaces: Rules against unused, optional, or conflicting props, favoring Pick<> over Omit<> and discriminated unions for explicit states.
- Composition & Encapsulation: Guidance on when to extract components versus hooks or pure functions, avoiding polymorphic components and className/style leakage.
- Overlay Patterns: Conventions for composing DropdownMenuController, PopoverController, and DialogController with Trigger asChild patterns.
- Use Case: When creating a new shared dialog or button component in the Langfuse codebase, apply these rules to keep its interface explicit and its styling deterministic via cva variants.
Quick Start
Use the react-component-guidelines skill to review the new component I am about to create and ensure its props and composition follow the project conventions.