install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/acquia/nebula/canvas-component-definition" ~/.claude/skills/neversight-learn-skills-dev-canvas-component-definition && rm -rf "$T"
manifest:
data/skills-md/acquia/nebula/canvas-component-definition/SKILL.mdsource content
Canonical definition
A Canvas component is a package of:
- A React implementation (
)index.jsx - Canvas metadata/schema (
)component.yml - Naming and structure compatibility (
, folder path, story path)machineName - Canvas-compatible props/slots modeling
All four parts are required for the component to be usable in Drupal Canvas.
Minimum contract (MUST)
Every Canvas component MUST satisfy all checks below:
- Component folder exists at
(use the repository's configured components root, which may be defined in<components-root>/<machine-name>/
).env - React implementation exists at
<components-root>/<machine-name>/index.jsx - Metadata exists at
<components-root>/<machine-name>/component.yml
includes required top-level keys (component.yml
,name
,machineName
,status
,required
,props
)slots- Folder name exactly matches
inmachineName
(kebab-case)component.yml - A matching story exists at
(use the repository's configured stories root)<stories-root>/<machine-name>.stories.jsx - Props/slots follow Canvas rules (for example, avoid unsupported array-of-object prop shapes; use slots for repeatable complex content)
If any item is missing, the component is incomplete for Canvas usage.
Naming guidance
Use
references/naming.md for naming rules and examples.
Skill coordination
Evaluate using companion skills in this order.
canvas-component-metadata- Use when creating/changing
, props/slots, enums, or fixing prop validation errors.component.yml
- Use when creating/changing
canvas-component-composability- Use when designing prop/slot structure, decomposing large components, deciding props vs slots, or modeling repeatable list/grid content.
canvas-styling-conventions- Use for all styling work: new components, style props, Tailwind token usage, CVA variants, class changes, and prop changes that affect styles.
canvas-component-utils- Use when rendering formatted HTML text or media via
andFormattedText
.Image
- Use when rendering formatted HTML text or media via
canvas-data-fetching- Use when fetching/rendering Drupal content with JSON:API, SWR, includes, and filter patterns.
canvas-component-upload- Use after implementation is complete and validated, when uploading and recovering from upload failures.