Build a form
Settings pages, properties panels and data entry all share one layout: a column of fields, each with a label, and the controls lined up so the eye can run down them.

Two settings do most of the work:
- Label position on each widget puts its label above or to the left of the control
- Label width on the container that holds the form sets one label column for every widget inside
Put the labels beside the controls
- Add the widgets of your form to a container, see Build the user interface
- On each widget, set
Label positiontoLeft - Select the container and set
Label width (widgets with Left labels)so the longest label fits
Every widget inside the container now starts its control at the same edge, including widgets in nested containers and in the rows of a UI template list.
Label position | What it looks like |
|---|---|
Default | The widget's own look: a floating label inside a text field, a title above a group, text beside a switch |
Above | A plain label above the control |
Left | A plain label in a column to the left, with the control beside it |
The label position only changes the user interface. On the canvas, widgets keep their usual look.
Use the same position for every widget of a form. A form that mixes Default and Left won't line up.
Widgets that have a label position
Text Field, Number Field, Dropdown (single select), Dropdown (multi select), Autocomplete (single select), Autocomplete (multi select), Switch, Checkbox, Radio Button, Slider, Color picker, Button Group, Button, Share Button and Diode.
A few of them behave slightly differently in a form:
- Switch: for an on/off value that should look like the rest of a form, set
ControltoCheckbox. It is still one on/off value. TheCheckboxnode is for picking several options from a list. - Button: its
Labelis the text on the button, so a button has no label of its own. WithLeft, the label column stays empty and the button starts where the other controls start. - Diode: its
Labelmoves into the label column, which makes it a status row, such as "Connected" with a light beside it. - Slider: a
{{value}}in itsLabelstays live, so the label can show the current value.
On narrow screens
A label moves above its control when there isn't room for both side by side. That happens once the widget is narrower than the label width plus 216px: a 16px gap and at least 200px for the control. With the default label width of 160px, that point is 376px.

This is measured per widget, not per screen. A form in a narrow column next to other content puts its labels above too, even on a wide screen. A shorter label width keeps the labels on the left in a narrower column.
Build a form from JSON
To edit a settings file, or any nested JSON, you don't need to place a widget per value. A UI template list builds one row per value:
- Build a template for one field, see Create reusable UI templates:
- Add a
Text Field, aNumber Fieldand aSwitchwithControlset toCheckbox, all withLabel positionset toLeft - Connect the parameter that receives the
keyto each widget'sLabel, and the value to each widget's initial value - Feed the value into a
Type ofnode, and connectIs String,Is NumberandIs Booleanto the matching widget'svisibleinput on the surface, so each row shows only the widget that suits its value - Add a
Select by keynode: connectType of'sTypeto itsKey, each widget'sOutto the case of the same kind (String,Number,Boolean) and the value toDefault. Connect itsOutputto the template'sOutput 1. - Optionally, add a text widget for headings: show the
keyin it and connect thegroupparameter to itsvisibleinput
- Add a
- Add a
UI template list, pick the template, connect your JSON toItemsand turn onExpand nested - Put the list in a container and set the container's label width
Each nested object or list gets a row of its own, which the template can show as a heading. The list's Output is the edited JSON, in the same shape as what came in.
Rows are indented by Indent per level, and the whole row moves, so the controls of nested rows start further right. That shows the structure of the data. If you would rather have every control on one edge, set Indent to 0 and let the headings show the structure.
Style the labels
The labels of Above and Left widgets use the theme's secondary text color, so the values stand out, the same as the labels widgets draw with Default. They can be restyled together, for example in capitals or in the full text color. See Style form labels.