Investigate component library modules

Changed

Context

There are several modules that provide an SDC component library in Drupal.

UI Patterns Library

UI Examples

SDC Styleguide

SDC Component Library

SDC Showcase

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 Patterns Library UI

UI Examples

Create example pages with yaml.

Uses render arrays to support rendering components, forms, entities, views, markup, etc.

Demo

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 Component Library UI

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.

SDC Styleguide UI

Issues

Auto generate demos based on 'examples' section in each component.yml file

Collaboration with UI Patterns 2

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.

SDC Showcase UI

Issues

Provide menu link to sdc showcase

Analysis

UI Patterns Library and UI Examples are quite useful and customizeable.

Rapidly develop stories and examples with claude.

Task type
Project
Parent task