What problem does it solve?
This Skill codifies best practices for building reusable React components with typing, prop forwarding, and a clean export strategy, reducing boilerplate and ensuring consistency across projects.
Core Features & Use Cases
- Stateless component blueprint with TypeScript interfaces prefixed by I<Component>Props
- Prop forwarding to native elements (e.g., aria-*, onClick, disabled) through {...rest}
- Class name merging with clsx to combine base component class with external class names
- Centralized exports to simplify usage across packages
- Use Case: A design-system team adds a new Button component and reuses it across dashboards without rewriting props handling.
Quick Start
Create a new component under packages/camphora-react/src/components, define the TS props interface, implement a functional component that forwards props, merge classes with clsx, and export it from packages/camphora-react/src/components/index.ts. Then ensure consumers can import via @idealjs/camphora-react.