canvas-design-decomposition
Canvas design decomposition
Mandatory triggers (load this skill first)
Load and follow this skill before proposing component structure for a component library, writing implementation plans, or implementing React—including when the user only asks for a plan or breakdown—whenever you are modeling how UI should split into Canvas components (a component library, section, or full page). The same applies when you are about to build, add, or scaffold components (see below). Treat any of the following as a trigger:
- Building or adding Canvas components: creating new folders under
src/components/, authoringcomponent.ymlandindex.jsx(or.tsx), scaffolding a component from a ticket or spec, coding a section from a design, or implementing a named block (hero, footer, card, and so on). Decompose before writing schema or React so names, slots, variants, and reuse stay aligned—unless the task is a trivial one-line tweak inside an existing, stable API.
More from drupal-canvas/skills
canvas-component-definition
Start here for any React component task to enforce the canonical Canvas
96canvas-component-metadata
Define valid component.yml metadata for Canvas components, including props,
94canvas-component-utils
Use utility components to render formatted text and media correctly. Use when
80canvas-data-fetching
Fetch and render Drupal content in Canvas components with JSON:API and SWR
80canvas-component-composability
Design Canvas-ready React components with slots and decomposition-first
78canvas-styling-conventions
Style Canvas components with Tailwind CSS 4 theme tokens and approved utility
77