Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

UI Styles

Documentation had been migrated to Gitlab page.

Design systems generally provide helpers and utilities CSS classes to apply on any element to handle generic CSS effects like background color, text effects, spacing, etc.

UI Styles allows:

  • developers to define styles (simple lists of concurrent CSS classes) from modules and themes in my_theme.ui_styles.yml files
  • site builders to use those styles depending on the modules enabled (sub modules of UI Styles or modules of its ecosystem).

The module generates a styles library page to be used as documentation for content editors or as a showcase for business and clients.

Example usage

Example of plugin declarations in the YML files.

Should I do a component or a style?

A question that can ask yourself when creating your design system.

Best practices

The currently identified best practices related to UI Styles

Guide maintainers

pdureau's picture
grimreaper's picture
g4mbini's picture