canvas-component-composability

Decompose React components into modular slot-driven units for Canvas compatibility.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AJV009/drupal-devkit --skill canvas-component-composability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: canvas-component-composability
Source: https://github.com/AJV009/drupal-devkit/tree/main/plugins/migrate-drupal-canvas/reference/canvas-starter/canvas-component-composability
Command: npx skills add https://github.com/AJV009/drupal-devkit --skill canvas-component-composability

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

Design Canvas-ready React components with slots and decomposition-first patterns. Use when (1) Designing a component's prop/slot structure, (2) A component is growing too large, (3) Deciding between props vs slots, (4) Refactoring monolithic components, (5) Modeling repeatable list/grid content. Ensures Canvas compatibility.

Frequently Asked Questions about canvas-component-composability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a large React component for Canvas compatibility?

Refactor large React components for Canvas compatibility by applying a decomposition-first approach that splits monolithic structures into modular, slot-driven units. This enforces explicit prop and slot boundaries with clear rules for when to split components.

What is the slot pattern in React component design?

The slot pattern in React component design structures components to accept explicitly defined slot areas rather than rigid props. This enables modular UI architecture and repeatable list or grid content modeling for Canvas-ready components.

When should I use slots vs props in React UI architecture?

Use slots vs props in React UI architecture when deciding between flexible content injection and strict predefined configurations. A slots-first pattern ensures Canvas compatibility and explicit decomposition rules for repeatable content modeling.

How do I model repeatable list or grid content in React using slots?

Model repeatable list or grid content in React by defining slot-driven component patterns that decompose grid items into modular units. This enforces a slots-first structure, ensuring each list item maps clearly to Canvas-compatible boundaries.

Do I need a specific React library to design Canvas-ready modular components?

You do not need a specific external React library to design Canvas-ready modular components. The approach relies on native React decomposition patterns and slot-driven architecture without requiring external dependencies.