The main advantage of using SDC in Drupal themes is that frontend developers can create components without the need to learn specific Drupal theming concepts. However, users still need to have an understanding of Drupal concepts in order to effectively utilize these components within templates.
SDC goes beyond Twig-based theming by enabling the creation of a common design system with independent or combined UI elements following atomic design principles. These elements can be utilized and reused across one or multiple themes, allowing for greater flexibility and modularity in frontend development.
Yes, SDC allows users to pass variables such as contextual links, attributes, and title suffixes to the component using Twig's include or embed functionality. This offers flexibility in customizing the component's behavior and appearance.
To attach additional CSS or JS files to the component, users can utilize the libraryOverrides key in the *.component.yml file. This allows them to specify additional libraries and their respective CSS or JS files for the components.
Schemas are not mandatory when defining components in themes. However, components without schemas cannot be overridden. To enforce that all components within a theme have schemas, users can add enforce_sdc_schemas: true to the theme.info.yml file.
At the moment, the following contrib modules are compatible with SDC:
- CL Server 2.x
- CL Devel 2.x
- CL Generator 2.x