Drupal is a registered trademark of Dries Buytaert
File Entity (fieldable files) 8.x-2.7 Minor update available for module file_entity (8.x-2.7). OpenAI Provider 1.2.4 Minor update available for module ai_provider_openai (1.2.4). Webform Booking 1.2.0 Minor update available for module webform_booking (1.2.0). Labor time tracker 1.0.0 Initial release available for module labor_time_tracker (1.0.0)! Phrase TMS Integration for TMGMT 8.x-1.29 Minor update available for module tmgmt_memsource (8.x-1.29). Intercept 2.0.27 Minor update available for module intercept (2.0.27). Domain Extras 3.0.4 Minor update available for module domain_extras (3.0.4). Content First 2.3.0 Minor update available for module content_first (2.3.0). Session Limit Module session_limit crossed 1,000 active installs. Kint 2.3.4 Module kint updated after 6 months of inactivity (2.3.4).

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)

Activity

Total releases
1
First release
Jun 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.3.0 Stable Jun 15, 2026