Skip to main content

Column

The Column widget is a layout container that stacks its child widgets vertically.

Definition and role

The Column widget arranges the children it holds top to bottom in a single column. Set how children align vertically and horizontally and how much space sits between them, and use the scroll anchor feature to scroll to a specific child.

  • Category: Layouts

Features

FeatureDescription
Vertical layoutStacks child widgets top to bottom in a single column.
AlignmentSet the vertical (main axis) and horizontal (cross axis) alignment.
Scroll anchorTurn on scrollAnchor to scroll to a specific child from a script.

How to use

  1. Open the Layouts category in the left widget palette.
  2. Drag and drop the Column item onto the canvas.
  3. Place child widgets inside the Column.
  4. Adjust the alignment and spacing with mainAxisAlignment, crossAxisAlignment, and spacing.

Properties

PropertyDescriptionDefaultValue / Type
mainAxisSizeHow much vertical space the widget takes upmaxmin, max
mainAxisAlignmentVertical (main axis) alignmentstartstart, end, center, spaceBetween, spaceAround, spaceEvenly
crossAxisAlignmentHorizontal (cross axis) alignmentcenterstart, end, center, stretch, baseline
spacingGap between children0Number
textDirectionHorizontal layout directionNot setrtl, ltr
verticalDirectionVertical reference directiondownup, down
textBaselineBaseline used for alignmentNot setalphabetic, ideographic
clipBehaviorHow overflow is clippednonenone, hardEdge, antiAlias, antiAliasWithSaveLayer
scrollAnchorUse the scroll anchor feature (for the scrollToAnchor script method)Off (false)true / false

Notes and tips

tip

To scroll to a specific position from a script, turn on scrollAnchor, give the child an id, then call scrollToAnchor(id).

Learn more

tip

For the Widget Control you can use to drive this widget from a script, visit Column Widget Control.