Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Sodium 3.0.2 Minor update available for module sodium (3.0.2). Release: Ai Text 2 Speech 1.2.1 Minor update available for module tts (1.2.1). Release: Palette🎨 1.0.4 Minor update available for module canvas_palette (1.0.4). Release: Did this help? 2.0.9 Minor update available for module did_this_help (2.0.9). Release: Horizon Aid theme 1.0.1 Minor update available for theme vartheme_bs5_horizonaid (1.0.1). Release: Educare theme 1.0.1 Minor update available for theme vartheme_bs5_educare (1.0.1). Release: Vartheme Bs5 5.0.3 Minor update available for theme vartheme_bs5 (5.0.3). Release: JWT Token Refresh 1.0.5 Minor update available for module jwt_token_refresh (1.0.5). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Module Revived: Ai Text 2 Speech 1.2.0 Module tts updated after 10 months of inactivity (1.2.0).

Layout Builder Component Attributes

11,874 sites Security covered Drupal 10–11
View on drupal.org

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)

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
1
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
2.3.0 Stable 10–11 Jun 15, 2026