Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Layout Builder Component Attributes

Security covered Under active development 16,712 sites

This module lets editors add custom HTML attributes like IDs, classes, styles, and data attributes to blocks within Drupal's Layout Builder. These attributes can be applied to the block's wrapper, title, or content for greater styling and control.

The Layout Builder Component Attributes module allows editors to add HTML attributes to Layout Builder components (blocks). Attributes can be added to 1) the block (outer) element, 2) the block title, and 3) the block content (inner) element.

(In order for attributes to be rendered on the the block content (inner) element, the active front-end theme must support content_attributes in its block.html.twig file. See README.md for more information.)

The following attributes are supported:

  • ID
  • Class(es)
  • Style
  • Data-* attributes

Note: The preferred installation method is Composer; however, beginning with version 1.1.0, this module also supports Ludwig for its dependencies.

Related Modules

Layout Builder Styles - Allows site builders to select from a list of styles to apply to Layout Builder blocks and sections. Styles are a set of defined CSS classes.
Block Attributes - Allows for attributes to be added to blocks (no Layout Builder support)
Block Class - Allows for classes to be added to blocks (Layout Builder support is postponed, pending core patch)

Drupal 10–11

Ask your assistant about Layout Builder Component Attributes

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

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Mar 2023
Latest release
2 weeks ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.4.0 Stable 10–11 Oct 13, 2026
2.3.0 Stable 10–11 Jun 15, 2026
2.2.0 Stable 10–11 Aug 29, 2024
2.1.3 Stable 9–10 Sep 18, 2023
2.1.2 Stable 9–10 Sep 18, 2023
2.1.1 Stable 9–10 Mar 1, 2023