Free cookie consent management tool by TermsFeed Generator
All Products & Integrations

jalpi page builder docs

Containers

Content container inside a Section. Supports block, flex and CSS-grid layout modes.

Jalpi CoreDeveloper
3 min read Β· November 2026

container β€” Content container inside a Section. Supports block, flex and CSS-grid layout modes. It is a structural node: it holds children and participates in the layout tree.

Identity#

FieldValue
Widget nameContainer
Node type (node.type)container
Palette groupLayout
Implementation pathStructural (layout node with children)
Available in the Elements panelYes
PHP element classJalpi_Element_Container
Editor canvas previewContainerRenderer
Inspector Content tabβ€” (no content controls)
Inspector Style tabShared StyleTab
Needs the frontend scriptNo

Purpose#

Content container inside a Section. Supports block, flex and CSS-grid layout modes.

Where it is registered#

Editor β€” WIDGET_REGISTRY in admin/editor/src/widgets/registry.ts with bespoke: true. The registry entry carries palette metadata and the seed defaultNode only; behaviour comes from the dedicated components.

Server β€” Jalpi_Element_Container is listed in Jalpi_Renderer::register_elements() and keyed by its type() return value, 'container'.

Sanitizer β€” 'container' is in the $allowed_types array of Jalpi_Sanitizer::sanitize_node().

Content schema (node.content)#

This type stores no content object. Its configuration lives in node.settings and node.styles.

Settings schema (node.settings)#

Keys accepted by Jalpi_Sanitizer::sanitize_settings() for this type, in addition to the shared keys every node has (cssId, cssClass, cssClasses, customCss, bgNormal/bgHover, overlayNormal/overlayHover, borderNormal/borderHover, and the st_* Split Animation group).

KeyType / allowed valuesDefaultNotes
layoutMode'block' | 'flex' | 'grid''block'Selects which group of layout keys applies
contentWidth / boxedWidth'full' | 'boxed' / CSS length'full'Container width behaviour
alignItems / columnGapflex keyword / CSS lengthβ€”Block-mode alignment and gap
flexDirectionrow | column | row-reverse | column-reverse'row'Flex mode
flexWrapModenowrap | wrap | wrap-reverse'nowrap'Flex mode
flexJustifyflex-start | center | flex-end | space-between | space-around | space-evenly'flex-start'Flex mode
flexAlignflex-start | center | flex-end | stretch | baselineβ€”Flex mode
flexGapCSS lengthβ€”Flex mode
gridAutoMode'none' | 'fill' | 'fit''none'Grid mode β€” auto-fill / auto-fit
gridColumnsinteger 1–12β€”Grid mode, clamped server-side
gridRowsinteger β‰₯ 1 or emptyβ€”Grid mode
gridGap / gridMinColSizeCSS lengthβ€”Grid mode
columnsinteger (legacy)1Kept for pages saved before layoutMode existed

Rendering#

Editor canvas β€” ContainerRenderer in admin/editor/src/components/canvas/CanvasNode.tsx. CanvasNode builds the inline preview style by layering Design-System token values, attached reusable classes, the node's own styles, then the active breakpoint's tabletStyles/mobileStyles.

Frontend β€” Jalpi_Element_Container::render() returns a single root tag scoped by the CSS selector .jalpi-container.jalpi-{id}, and pushes its rule set into the renderer with $renderer->add_css(). That single-root-tag contract is what lets the interaction engine inject data-jalpi-interact on any widget without per-widget code.

Behaviour β€” static markup only; this widget does not cause the frontend script to be enqueued.

Capabilities inherited from the node model#

Every node type β€” including this one β€” gets the following for free, because they operate on the tree rather than on any single widget:

  • Style tab β€” typography, colours, background, border, shadow, spacing.
  • Advanced tab β€” margin, padding, per-device visibility, CSS ID / class, reusable classes, per-element Custom CSS.
  • Responsive overrides β€” tabletStyles and mobileStyles sibling maps, plus hideOn.
  • Animation tab β€” the Interaction Engine (node.interactions) and the Split Animation group (settings.st_*).
  • Design System links β€” node.globalStyleRef for atomic tokens and composite typography/button presets.
  • Editor operations β€” copy, paste, duplicate, lock, drag-reorder, undo/redo, save as template, revision history.

Code Examples#

Minimal node JSON#

The shape this widget takes inside `page_data.sections`. Ids must be unique across the whole tree.

{
  "id": "container_a1b2c3d",
  "type": "container",
  "styles": {},
  "children": []
}

Notes#

Good to know

  • gridColumns is clamped to 1–12 and flex*/grid* values are validated against fixed allow-lists in Jalpi_Sanitizer::sanitize_settings().
Source

Files

includes/elements/class-jalpi-element-container.php admin/editor/src/components/canvas/CanvasNode.tsx admin/editor/src/widgets/registry.ts includes/class-jalpi-sanitizer.php includes/class-jalpi-renderer.php

Classes

Jalpi_Element_Container

Functions

render type

Last updated: November 2026