Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Layout Builder Styles

Security covered Under active development 23,648 sites

This module allows site builders to apply predefined styles, represented by CSS classes, to blocks and sections within Drupal's Layout Builder. Styles can be organized into groups, enabling users to select multiple styles for different design needs like padding or color schemes.

Overview

This module allow site builders to select from a list of styles to apply to layout builder blocks and layout builder sections.

A "style" is just a representation of one or more CSS classes that will be applied. Additionally, for blocks, a block template suggestion is added for the selected style.

Styles can be grouped, allowing site builders to select one or more styles from each group. For example, you could have a group called "Padding" which a few styles that affect the amount of padding around a block. An additional group "Color Scheme" can be added to allow site builders to choose between multiple color styling options for a block.

Features

  • Create multiple style "groups", allowing site builders to select a style from each group for the same block or section.
  • Enforce a selection of no more than 1 style, or allow any number of styles to be selected.
  • Optionally restrict styles to only be available on specific block types and section layout types.
  • Styles and style groups are config entities and can therefore be exported/imported as any other configuration.

Limitations

For sections, there's currently a requirement that the layout plugins available on your site already have a configuration form associated with them. This module alters that config form to add the style selection dropdown. See this guide for more information on how you can create your own layout plugins that have a configuration form.

Documentation

Please refer to the documentation for more information how to use this module.

Versions

The 8.x-1.x branch is compatible with Drupal 9 only. It is no longer maintained.
The 2.0.x branch is compatible with Drupal 9 and Drupal 10 and is actively maintained.

Version 8.x-1.0 and 2.0.0 are otherwise identical in terms of features. All site owners should upgrade to a 2.0.x version.

Related Modules

Drupal 8–11

Ask your assistant about Layout Builder Styles

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

  • layout_builder Drupal core

Required by

1 tracked project depends on this one

Activity

Tracked releases
1
Tracked since
Sep 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
2.1.0 Stable 8–11 Sep 23, 2024