The state of JavaScript Code Components in Drupal Canvas
summary
Drupal Canvas ships a zero-setup in-browser code editor for React + Tailwind with WebAssembly-based compilation and an in-browser Tailwind build; a CLI supports CLI upload/download to sync a separate UI repo, Storybook integration, and a vite plugin to run JSON:API requests locally. Image optimization uses an npm package called next-image-standalone that generates Drupal image styles and srcset. Workflows include SWR + JSON:API, agentic skills to auto-refactor, required ESLint checks, SSR and third-party imports pending, and a proven Acquia production year.
AI-written summary · about
chapters (26)
- 0:00Introduction and background
- 1:28Drupal Canvas overview
- 3:14Scaffolding a new codebase
- 6:09Component structure and setup
- 7:30Storybook integration
- 8:36Syncing components to Drupal
- 11:24Building with components in Canvas
- 12:29Image optimization in components
- 15:22Publishing and downloading changes
- 16:44Creating a button component
- 17:47Agentic skills ecosystem
- 19:14ESLint configuration for components
- 22:45Building a navigation component
- 23:51Data fetching with JSON API
- 27:25Local development with Vitest plugin
- 28:33Creating content templates
- 30:00Using formatted text components
- 31:24Tailwind CSS typography plugin
- 32:06Fetching and listing articles
- 35:57Filtering current article in lists
- 36:20Decoupled frontend with Canvas
- 38:10Astro proof of concept demo
- 39:14Current limitations and roadmap
- 43:05Comparison with SDCs
- 45:54Mixing SDCs and code components
- 46:14Q&A session
