Skip to main content

Columns

Responsive multi-column layout: distributes its children into columns whose relative widths come from a layout string.

Columns lays out its visual children in a grid of columns described by layoutString: a space-separated list of relative widths, so '1 2 1' means three columns where the middle one is twice as wide as the outer ones (default '1 2 1'). Children fill the columns in order and wrap into further rows when there are more children than columns. marginX (Horizontal Gap) and marginY (Vertical Gap) set the spacing in pixels (default 16), and minWidth (Min Column Width) makes the layout responsive: when the container gets too narrow to honour the minimum, columns fold away and content reflows into fewer, wider columns. direction flips the fill order between row and column, and justifyContent aligns partial rows. The node warns in the editor if layoutString is bound to a non-string.

When to use it

Card grids, dashboards, magazine-style layouts — anywhere content should reflow across a variable number of columns. For a fixed row or column of items a plain Group with flexDirection is simpler; for one instance per data record put a For Each inside the Columns.

At a glance

CategoryVisual
Type namenet.noodl.visual.columns
Available inbrowser
SSR compatibilitysafe
Provided bynoodl-viewer-react

Inputs

Values

NameTypeDefaultDescription
cssClassNameString``Extra CSS class names to put on this element, for styling from a stylesheet you supply
directionEnum (row, column)rowWhether items fill across rows or down columns
justifyContentEnum (flex-start, flex-end, center)flex-startWhere the columns sit as a group when they do not fill the container
layoutStringString1 2 1Column widths as space-separated proportions, so "1 2 1" makes the middle column twice as wide
marginXNumber16Space between columns, drawn as a gutter rather than as padding on the items
marginYNumber16Space between rows
mediumBreakpointNumberContainer width below which Medium Layout replaces Layout String; this is the container, not the viewport
mediumLayoutStringLayout String to use below Medium Below; leaving it blank makes the breakpoint inert
minWidthNumber0Columns are dropped from the end rather than shrink below this; with Auto Fit it decides how many there are
mountedBooleantrueRemoves the element from the page entirely when false, unlike Visible which leaves its space behind
packingEnum (rows, masonry)rowsRows makes every item in a row as tall as the tallest; Masonry lets each column pack independently
sizingEnum (layoutString, autoFit)layoutStringLayout String sets the columns explicitly; Auto Fit derives them from Min Column Width and the space available
smallBreakpointNumberContainer width below which Small Layout replaces the others; it wins over Medium Below
smallLayoutStringLayout String to use below Small Below; leaving it blank makes the breakpoint inert
styleCssString/* background-color: red; */Raw CSS declarations applied to this element, overriding the styling ports above
variantStringName of a saved variant of this node type to apply, replacing the styling set here

Outputs

Values

NameTypeDefaultDescription
boundingHeightNumberHeight this element actually ended up with after layout, in pixels
boundingWidthNumberWidth this element actually ended up with after layout, in pixels
childIndexNumberThis element's position among its parent's children, counting from 0
childrenCountNumberHow many child elements are currently mounted inside this one
screenPositionXNumberDistance in pixels from the left edge of the window to this element's left edge
screenPositionYNumberDistance in pixels from the top edge of the window to this element's top edge
thisReferenceA reference to this node itself, for ports that take a node rather than a value

Signals

NameTypeDefaultDescription
didMountSignalFires once this element has been added to the page and can be measured
willUnmountSignalFires just before this element is removed from the page, while it still exists

Patterns

  • Responsive card grid: layoutString '1 1 1' + minWidth ~200 so three columns collapse to two, then one, as the viewport narrows.
  • For Each inside Columns: repeated component instances distribute across the columns automatically.

Examples

Media card row: Columns layout with Image, Icon and Circle

A card layout composed from the visual primitives: Columns (net.noodl.visual.columns) distributes its children by a layout string ('1 2' — the second column twice as wide), the Image shows a picture from a URL/asset on src, the Icon (net.noodl.visual.icon) renders a themed glyph, and the Circle doubles as a status dot whose fillColor is data-driven. Layout is containment; only the dynamic bits (image source, status color) are wired.

Group, Repeater

Generated

This page is generated from node-catalog-enriched.json. Do not edit it by hand — run npm run docs:nodes to regenerate, and fix the source enrichment instead.