Skip to content

Container (v1)

Container component written in HTL.


  • Configurable layout type.
  • Configurable background image and background color:
    • Background images and colors can be enabled through policy configuration.
    • Color swatches for background color can be defined through policy configuration.
    • Background color can be restricted to only allow swatches through policy configuration.
  • Configurable HTML ID attribute.
  • Allowed components can be configured through policy configuration.
  • Style System support.

Use Object

The Container component uses the com.adobe.cq.wcm.core.components.models.LayoutContainer Sling model as its Use-object.

Component Policy Configuration Properties

The following configuration properties are used:

  1. ./backgroundImageEnabled - defines whether to display a background image option.
  2. ./backgroundColorEnabled - defines whether to display a background color option.
  3. ./backgroundColorSwatchesOnly - defines whether or not to display swatches in the background color picker.
  4. ./allowedColorSwatches - defines a list of background color swatches that are allowed to be selected by an author.

It is also possible to define the allowed components for the Container.

Edit Dialog Properties

The following properties are written to JCR for this Container component and are expected to be available as Resource properties:

Container Properties

  1. ./layout - defines the layout type, either simple (default) or responsiveGrid

Common Properties

  1. ./id - defines the component HTML ID attribute.
  2. ./backgroundImageReference - defines the container background image.
  3. ./backgroundColor - defines the container background color.

BEM Description

BLOCK cmp-container

Enabling Container Editing Functionality

The following property is required in the proxy component to enable full editing functionality for the Container:

  1. ./cq:isContainer - set to {Boolean}true, marks the Container as a container component


If you were involved in the authoring of this component and are not credited above, please reach out to us on GitHub.

You can’t perform that action at this time.