column β Column inside a Container. Width is expressed as a percentage and can be dragged on the canvas. It is a structural node: it holds children and participates in the layout tree.
Identity#
| Field | Value |
|---|---|
| Widget name | Column |
Node type (node.type) | column |
| Palette group | Layout |
| Implementation path | Structural (layout node with children) |
| Available in the Elements panel | Yes |
| PHP element class | Jalpi_Element_Column |
| Editor canvas preview | ColumnRenderer |
| Inspector Content tab | β (no content controls) |
| Inspector Style tab | Shared StyleTab |
| Needs the frontend script | No |
Purpose#
Column inside a Container. Width is expressed as a percentage and can be dragged on the canvas.
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_Column is listed in Jalpi_Renderer::register_elements() and keyed by its type() return value, 'column'.
Sanitizer β 'column' 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).
| Key | Type / allowed values | Default | Notes |
|---|---|---|---|
width | percentage string | β | Set by setContainerColumns and the canvas divider drag |
alignSelf | flex keyword | β | Per-column cross-axis override |
bgNormal / bgHover / overlayNormal / overlayHover / borderNormal / borderHover | BgData / BorderData | β | Same shared buckets as Section |
Rendering#
Editor canvas β ColumnRenderer 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_Column::render() returns a single root tag scoped by the CSS selector .jalpi-column.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 β
tabletStylesandmobileStylessibling maps, plushideOn. - Animation tab β the Interaction Engine (
node.interactions) and the Split Animation group (settings.st_*). - Design System links β
node.globalStyleReffor 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": "column_a1b2c3d",
"type": "column",
"styles": {},
"children": []
}Source
Files
includes/elements/class-jalpi-element-column.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_Column
Functions
render type
Last updated: November 2026