This project is not covered by Drupal’s security advisory policy.

Style Options Conditions extends the Style Options module with a condition plugin system for paragraph types. Style options are only shown in the editor and applied to rendered output when all declared conditions pass, enabling context-aware option visibility without writing custom PHP per paragraph type.

Conditions are declared directly in your *.style_options.yml file alongside the options they guard. Multiple conditions on a single option are ANDed — all must pass. New condition types can be added by any module using the plugin system.

Included submodule: Style Options Conditions: Layout

The style_options_conditions_layout submodule provides the layout condition plugin, which evaluates visibility based on Layout Paragraphs context. layout_paragraphs is not a hard dependency — the plugin checks for the module at runtime and fails open if it is not installed.

Example use cases

  • Show a "Container Width" option only when a paragraph is placed at the top level of a page, not inside a grid
  • Show a "Column Span" option only when a paragraph is inside a specific multi-column layout
  • Show a layout-specific option only in certain regions (e.g. header and footer, but not content)
Supporting organizations: 
Sponsored Development
Sponsored Development

Project information

Releases