canvas-component-authoring

Author and style Drupal Canvas React components with Tailwind and CVA variants.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers to write, modify, and style React components for Drupal Canvas and Drupal CMS using a standardized approach that ensures consistency, reusability, and clear documentation across projects.

Core Features & Use Cases

  • Covers the technology stack (React 19, Tailwind CSS 4, CVA variants, cn utility) and explains how to define component props and slots in a component.yml.
  • Documents naming conventions (enum names, image/video prop types, and formatted text fields) and demonstrates how to align them with the project’s theme tokens from global.css.
  • Provides the required project structure (index.jsx + component.yml) and guidance for matching source site visual styles such as dark backgrounds, gradient text, glass/blur effects, and updating theme tokens.
  • Use when building, editing, or fixing any component in src/components/.

Quick Start

Create a new component under src/components/ following the index.jsx and component.yml structure, then start implementing and styling it with Tailwind and CVA according to the guidelines.

Frequently Asked Questions about canvas-component-authoring

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

FAQPage Schema
How do I style React components for Drupal Canvas using Tailwind and CVA?

To style React components for Drupal Canvas, this skill guides you to use Tailwind CSS 4 alongside CVA variants and a cn utility, ensuring standardized and reusable styling across your project.

What is the required file structure for authoring a Drupal Canvas component?

The required structure for authoring a Drupal Canvas component involves creating an index.jsx file paired with a component.yml file under the src/components/ directory to define implementation and metadata.

How do I align Drupal CMS component props with theme tokens from global.css?

Aligning component props with theme tokens involves documenting naming conventions for enums and media fields in component.yml, then matching those definitions to the project's theme tokens sourced from global.css.

Can I replicate visual styles like gradient text and glass effects in Drupal Canvas components?

Yes, you can replicate visual styles like gradient text and glass effects in Drupal Canvas components by applying specific Tailwind classes and updating the theme tokens within your global.css file.

Does this skill support building components with React 19 for Drupal CMS?

Yes, this skill supports building components with React 19 for Drupal CMS by providing a standardized approach that covers the full technology stack including Tailwind CSS 4 and CVA variants.

What metadata frontmatter is needed for a Drupal Canvas component?

The required metadata frontmatter for a Drupal Canvas component includes a name and description, structured as YAML with three sections, alongside optional resource directories for scripts and references.