Declarative Shadow DOM and the future of Drupal Theming

conference: Drupalcon Nara 2025, Nara

The era of React.js is coming to an end

Drupal’s old school theming system is server-side rendering. And in the tech world, everything old is new again. In the last two years, modern frontend frameworks have been trying to figure out how to server-side render their client-side JavaScript.

React v19 has figured out how to split its components into client and server parts. As of August 2024, this same ā€œsplit componentā€ capability is now a part of native Web Components with the introduction of Declarative Shadow DOM. Instead of being written in client-side JavaScript, web components with Declarative Shadow DOM can now be defined using HTML and CSS only.

So if Drupal was server-side rendering before it was cool, can we leverage Declarative Shadow DOM inserted into Single Directory Components to make Drupal cool again?

Video source: Watch on YouTube

Color theme