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

Contributed module documentation

Layout Builder Styles

Layout Builder Styles allows site builders to define styles that can be applied to sections & blocks placed via Layout Builder. Each style will apply user-defined CSS class attributes to the element wrapper.

When placing a block in a layout, this module will check if styles are available, and if so, present the user with a list of available styles. Similarly, layout styles can be applied when configuring a layout section.

Other features:

  • Styles can be restricted to layouts or blocks.
  • A site-wide configuration form sets whether single or multiple selections can be applied.
  • A user interface is provided for managing the styles available. Since a style is a configuration entity, it can be exported and imported just like any other configuration data. 

This module requires Drupal 8.7.0+.

Block theme hook suggestions

Styles applied will add block template suggestions

Related modules

Related block style modules.

Section & block styles

Layout Builder Styles allows you to apply styles to both blocks and sections in Layout Builder.

Style configurations

Defining and detailing Layout Builder Style configurations and settings.

Using Layout Builder Styles

Layout Builder Style usage on Layout Builder-enabled entities.

Guide maintainers

Webbeh's picture