Skip to content

Section

A section is a frame on the grid: a rectangle with a title on its top border, a background and a border. It does not contain widgets; it shares cells with the ones it frames and is painted under them. Place the section over the cells you want to group and the widgets inside it look like one block. It has no value and no output: it only draws.

The title sits on the border like the legend of a form group and takes no cells: the widgets can use the whole frame. A section only works in the grid regions of a page (Main, Top band, Second column), not in stack regions such as the sidebar.

A Pump cycle section on the Control page in the builder: the frame with its title on the top border around five widgets, the Stop button with a lock badge, and a Last command widget outside the frame

A section framing five widgets; the lock on Stop shows that widget is locked.

Drop a Section (Layout category) on the page and size it over the widgets you want to group, or drag it onto them: the widgets whose whole rectangle ends up inside belong to it. Membership is never stored; it is read from the cells every time.

  • Move: dragging the section (grab it in an empty part of the frame, a click on a widget inside selects that widget), the arrow keys or the Column / Row fields move the section with its members as one block, in one undo step. Drag a member out of the frame and it no longer belongs to it.
  • Resize: the section can’t shrink past its members (it stops at their bounding box); growing it leaves them where they are, and the widgets that then fit inside belong to it.
  • Duplicate (Ctrl + D), Copy / Paste (Ctrl + C / Ctrl + V) and Move to page take the members along and keep their arrangement; the copy lands where the whole block fits.
  • Overlaps: a section shares cells with its widgets (they don’t push it and it doesn’t push them), but two sections never overlap: the one you drop or grow over another pushes it down, members included. Align, Distribute and Match size work on sections too.
  • Delete always asks what to do with the widgets inside: Delete section only, Delete section and N widgets or Cancel. One undo step.
  • A section only goes in grid regions; dragging it into a sidebar shows a hint and does nothing.
  • On the Phone preview a section is its header and dragging it moves the whole block (see below); the Tablet preview shows what a tablet shows.

A frame needs room, so below 768 px (and on a tablet with columns of its own, tabletCols above 0) a section becomes a header: a full-width line with its icon and title, no frame, followed right after by its members. The widgets of a section stay together, in one block, in reading order (row by row, left to right):

  • Inside the block the members follow their phoneOrder, then their reading order; a tablet with its own columns uses reading order only (it has no phone order).
  • The section’s own position places the block: its phoneOrder (or its reading position) moves the whole block, members included. A widget that lies between the members in reading order but outside the frame goes after the block, not inside it.
  • hideOn on a section hides only its header; its members have their own.
  • A section with no title and no icon shows nothing on phones.
  • A tablet that follows the desktop grid (tabletCols 0, the default) keeps the frame and every cell where it is on the desktop.

In the Phone preview, dragging a section header moves its block and writes only the section’s phoneOrder; dragging a member reorders it inside its block, and a widget dropped on a member lands before or after the block. The header has no size handle (its height is fixed).

Property Type Default Description
label string Section Title on the top border (optional)
icon string Lucide icon before the title
background none · surface · tint none Fill of the frame: transparent, the surface of a tile, or a soft tint of the accent color
border boolean true Draw the border

Colors come from the theme, so the frame follows the dark and light themes and the accent color. Hidden on phones and tablets with hideOn like any widget.

A section has no value: msg.payload is ignored and there is no output. msg.ui changes its properties, for example to mark a line that stopped:

msg.ui = { background: 'tint' }; // highlight the frame
msg.ui = { label: 'Line 1 · STOPPED' }; // change the title
msg.ui = { border: false }; // no border