Context
There are several modules that provide an SDC component library in Drupal.
View UI Patterns Library on Drupal.orgUI Patterns LibraryCovered by the Drupal security advisory policy (7,550 installs)
View UI Examples on Drupal.orgUI ExamplesCovered by the Drupal security advisory policy (430 installs)
View SDC Styleguide on Drupal.orgSDC StyleguideCovered by the Drupal security advisory policy (194 installs)
View SDC Component Library on Drupal.orgSDC Component LibraryCovered by the Drupal security advisory policy (569 installs)
View SDC Showcase on Drupal.orgSDC ShowcaseCovered by the Drupal security advisory policy (118 installs)
What are the differences between these, and which one should I use?
Discovery
Story definition is not standardized.
Canvas uses first item in component prop's examples.
UI Patterns Library
UI Patterns submodule.
Uses <component_id>.<story_id>.story.yml files.
Install UI Suite DaisyUI theme for a complete demo.
UI Examples
Create example pages with yaml.
Uses render arrays to support rendering components, forms, entities, views, markup, etc.
SDC Component Library
Most basic functionality.
Uses <component_id>.story.twig files. (One story per component, but can include code to demo multiple.
Standalone component url supports visual regression testing.
WCAG checker accessibility validation.
SDC Styleguide
Lets you modify prop values.
Uses <component_id>.demo.<story_id>.yml files.
Has a drush command for generating demo files: drush generate sdcs-demo.
Embed demos in templates via render array.
Accessibility checker for component demos.
Issues
View on Drupal.org #3557385Auto generate demos based on 'examples' section in each component.yml file Status: Active
View on Drupal.org #3464909Collaboration with UI Patterns 2 Status: Needs work
SDC Showcase
Automatically generates prop values for demos. Checks minimum/maximum.
Entity directives provide mock values.
Standalone component url supports visual regression testing.
Use collections to demo landing pages or complex components.
See example submodule for a demo.
Issues
View on Drupal.org #3616373Provide menu link to sdc showcase Status: Reviewed & tested by the community
Analysis
UI Patterns Library and UI Examples are quite useful and customizeable.
Rapidly develop stories and examples with claude.