What problem does it solve?
Helps developers and designers avoid monolithic React components that are hard to reuse and incompatible with Drupal Canvas by promoting slot-based composition and decomposition-first patterns. It addresses issues like excessive props, poor reusability, and Canvas limitations around array props by guiding how to model repeatable content and declare slots.
Core Features & Use Cases
- Slot-first composition: Prefer slots for variable or nested child content so Canvas users can compose instances directly in Workbench.
- Decomposition guidance: Identify when to extract repeated or standalone elements (cards, metadata items, link groups) into child components.
- Repeatable content patterns: Convert array/object item patterns into parent/child slot pairs for lists, grids, carousels, and similar UIs while preserving interactive drop zones.
- Practical examples: Refactor a large article card into article-meta, resource-cover, and metadata-item components and declare a named slot in component.yml.
Quick Start
Ask the skill to analyze a large React component and produce a decomposition plan that declares named slots in component.yml, recommends child components, and notes minimum slot container sizes.