~/talk

Drupal Twig and SDC Tips for Building Flexible Component Libraries

Talkat DrupalCamp Colorado 2026 · 2026-08-27..08-28· [php, component-design]
links:none on file
slides:none on file

SDC lands in core (Drupal 10) and provides a component YAML schema, automatic library bundling and per-component attributes, but docs lag and namespaces are surprising: generated libraries use core/components.{theme}--{component}. Use slots for rendered content (render arrays, images) and props for typed data (enums, variants) to avoid validation errors, prefer the new include with with context=false so components stay agnostic, and wrap components with simple Drupal presenter templates or use UI Patterns to map field data into the SDC contract.

AI-written summary · about

  1. 0:00Introduction
  2. 2:10What components promised
  3. 6:47SDC in Drupal core
  4. 8:31Key confusion points
  5. 11:20Props vs slots explained
  6. 17:24Generated component libraries
  7. 18:26Handling attributes in components
  8. 21:57Best practices for SDC
  9. 28:15Migrating Layout Builder
  10. 32:57Documentation challenges
  11. 39:43Attributes deep dive
  12. 40:45Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.