Component-based design using almost only Drupal Core
summary
Shows how to build reusable front-end components for Drupal 8/9 using mainly Drupal Core plus the Components! module, leveraging Twig features and ideas from the Radix theme (like asset auto-loading) to keep JS/CSS scoped per component and improve performance. Explains render arrays and theme hooks for beginners, and provides advanced techniques to create portable micro-libraries of CSS, Twig and JS that can be reused across projects, while briefly mentioning more complex approaches such as UI Patterns and Emulsify.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:44What is a component
- 4:38Component initiatives in Drupal
- 7:08Setting up a component
- 11:17Components in templates
- 13:25Extending components
- 16:38Components and entities
- 18:23Passing field values
- 21:28Delegating markup
- 23:33Components to Twig
- 27:23Real-world use case
- 31:17Acknowledgments
- 32:06Q&A
