Reusable Paragraphs with Single Directory Components Now Possible in Drupal 11

Reusable Paragraphs with Single Directory Components Now Possible in Drupal 11

Rakesh James has published a detailed guide demonstrating how to create reusable paragraphs using Single Directory Components (SDC) in Drupal 11, showcasing how developers can implement modular design systems using custom themes and scoped component architecture.

Using a paragraph type called image_card within a custom theme, James walks through the process of generating SDC components using Drush. The implementation embeds a component template via Twig using simple slot values for image and content. Supporting files such as a YAML metadata file and a Twig template define the structure and logic of the component. Once configured, the image and text content are rendered cleanly and consistently using the SDC system, which also automatically applies associated CSS and JavaScript.

The blog also details how the same component can be rendered inside a custom block plugin using Drupal’s render array format, offering developers flexible placement across content structures. This encapsulation allows developers to write maintainable code while keeping presentation logic modular and isolated from unrelated styles or scripts. The tutorial encourages the use of SDC to reduce redundancy, improve readability, and streamline the theming process in modern Drupal development.

According to Rakesh, the method supports scalable UI design patterns that benefit both large and small projects, especially when consistent styling and behavior are required across multiple paragraph types. With SDC now part of Drupal core, the approach is expected to become a front-end standard moving forward.

To explore the full tutorial, visit Rakesh James’ blog: Building Reusable Paragraphs with SDC in Drupal 11.

Disclosure: This content is produced with the assistance of AI.

Disclaimer: The opinions expressed in this story do not necessarily represent that of TheDropTimes. We regularly share third-party blog posts that feature Drupal in good faith. TDT recommends Reader's discretion while consuming such content, as the veracity/authenticity of the story depends on the blogger and their motives. 

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related People

Upcoming Events

Latest Opportunities