Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Style Options Conditions

No security coverage Under active development 5 sites

This module allows you to selectively show style options for paragraphs based on defined conditions. Style options will only appear in the editor and affect the final output if these specified conditions are met, making them context-aware without requiring custom code.

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)
Drupal 10–11

Ask your assistant about Style Options Conditions

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
May 2026
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core PHP Release date
1.0.0 Stable 10–11 May 22, 2026
1.0.x-dev Dev 10–11 May 22, 2026