Optional alignCross-axis alignment of every child within its slot. Default "stretch".
Optional alpha0..1, default 1.
Optional bottomDistance from parent's bottom edge to this node's bottom edge.
Optional centerXHorizontal offset from the centre of the parent. 0 = perfectly centred.
Optional centerYVertical offset from the centre of the parent. 0 = perfectly centred.
Optional gapSpace between adjacent children along the flow axis. Default 0.
Optional heightOptional idRequired if the node needs to be targeted by animations or runtime
setters. "frame" is reserved - used by positional tweens as
relativeTo: "frame" to reference the video frame.
Optional leftDistance from parent's left edge to this node's left edge.
Optional marginReserves space on each side of the node by inflating its bounding box. Lives on the child rather than as container-level padding, so the parent needs no declaration to give one of its children breathing room.
child + margin, so
margin effectively enlarges the parent. This drives the
"background plate" pattern: in an auto-sized group, put an
omitted-size Rect next to a Text with margin: "10px" -- the
group hugs text plus margin, the rect autofills the group, and
the text sits visually inset 10 px inside the plate.StackNode margin is added to the child's flow slot on
both sides and compounds with gap: two adjacent children with
margin: "10px" separated by gap: "5px" produce a 25 px visual
gap (10 + 5 + 10).Optional maskId of a RectNode with isMask: true whose bounds clip this node.
The mask rect may live anywhere in the tree; it is resolved by id at
parse time. Only rects may be used as masks.
Optional maxOptional maxOptional minLower bound for the node's computed height. See minWidth.
Optional minLower bound for the node's computed width. Clamps the laid-out size
from below - applies to both auto-sized nodes (hugged size lifted to
minWidth) and explicit-sized nodes (if width < minWidth, wins
minWidth, same as CSS).
Optional rightDistance from parent's right edge to this node's right edge.
Optional topDistance from parent's top edge to this node's top edge.
Optional visibleDefault true.
Optional width
Linear layout container - lays its children sequentially along
direction(row= left -> right,column= top -> bottom) withgapbetween them.Sizing:
width/heightis set on the relevant axis, that size is used.margin) + gaps on that axis.margin) on that axis.Lengthrule applies per-axis: a child's fractionalwidth/heighton an auto-sized axis does not contribute to the stack's hug there (it would be circular) and resolves against the stack's final size at layout; the hug comes from"Npx"/intrinsic children.Positioning of stacked children (unified with
GroupNode's slot model - every child sits in a slot in the parent's inner area):width/height,centerX/centerY, andmin/maxclamping. The only stack-specific extras arealign(default cross positioning when no centre/inset is set) and the autofill rule on the cross axis (see below).fillSize - a - b(fillSize = slot size minus the child's margin on the axis).width/height-> as declared.fillSize - inset.fillSize.centerX/centerYon it (on the cross axisalign: stretchis additionally required). A single inset anchors a non-rect at its intrinsic size - exactly as in a group - while a rect still autofills from the anchor.min/maxconstraints do not change the regime - they clamp the autofilled size like any other computed size. So a rect with noheightandcenterY: 0autofills the cross slot (andcenterY: 0is moot since the fill already centres it); the same rect withheight: "8px"andcenterY: 0is 8px tall and centred.left/top) ->fillStart + inset.fillEnd - inset - size.centerX/centerY->fillStart + (fillSize - size)/2 + value.align.fillStart. Insets andcenterX/centerYresolve against the slot's size (both the anchor and the fraction's multiplier live in the slot); explicit dims andmin/maxresolve against the stack's inner size.left: "-4px"with nowidthautofillsfillSize - (-4) = fillSize + 4and anchors atfillStart + (-4)- the rect extends 4px past the leading slot edge while still reaching the trailing edge. Same idea on any axis. If a single inset places the child fully outside the slot, autofill collapses to size 0.alignstill controls cross positioning for children with no cross-axis positional field.stretch(the default) is the autofill trigger for non-rect children. Per-child align overrides are not supported.def[prop]so they inherit the same rules. A{ property: "centerY", from: -1 }on a row-stack child animates the cross centre offset (slot-relative). A{ property: "top", from: "30px" }on a row-stack child shifts the autofill range / single-inset anchor over time.