Reference
Nodes
Components
Iterator

Iterator Component

Iterators repeat a component (opens in a new tab) for every element in the source data. This is most useful for displaying lists or grids of items.

Each element within the source data is provided as component props via {{$props}}. You can access the current index (0-indexed) as {{$index}}.

Properties

Visible

PropisVisible
Typeboolean
Defaulttrue

Whether or not this node is visible.

Enabled

PropisEnabled
Typeboolean
Defaulttrue

Whether or not this node is enabled.

Tooltip

Proptooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

Proptop
Typenumber
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

Propleft
Typenumber
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

Propwidth
Typestring
Default768px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width can be specified using CSS units (e.g. 100px or 100%), or be left unitless to be treated as flex-grow for the node.

Min Width

PropminWidth
Typestring
Defaultundefined

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropmaxWidth
Typestring
Defaultundefined

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

Propheight
Typestring
Default392px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height can be specified using CSS units (e.g. 100px or 100%), or be left unitless to be treated as flex-grow for the node.

Min Height

PropminHeight
Typestring
Defaultundefined

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropmaxHeight
Typestring
Defaultundefined

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

Propoverflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropoverflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropoverflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

Propstyles
Typestring
Default::component { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

Object Fit

PropobjectFit
TypeObjectFit ('none' | 'contain' | 'cover' | 'fill' | 'scale-down')
Defaultcover

The strategy used to set how the content of a replaced element should be resized to fit its container.

Data

Propdata
Typeunknown
Defaultundefined

The source data array. For each item in this array, the component will be instantiated.

Component

Propcomponent
Type(string | null)
Defaultundefined

The component to render for each item in the data array.

Layout Style

ProplayoutStyle
TypeNodeLayoutStyle ('GRID' | 'HORIZONTAL_STACK' | 'VERTICAL_STACK')
DefaultVERTICAL_STACK

The layout style of the individual items in the iterator (horizontal or vertical stack).

Padding

Proppadding
Typestring
Default16px

The internal padding of the iterator to place around its children.

Spacing

Propspacing
Typestring
Default16px

The spacing to use between child nodes of the iterator.

Background Color

PropbackgroundColor
Typestring
Defaultbackground.base

Background color

Border Radius

PropborderRadius
Typestring
Default4px

The radius of the rounding of the corners of the container. Set to 0 to have no rounded corners.

Box Shadow

PropboxShadow
Typestring
Defaultmd

The box shadow of the iterator. Supports standard box-shadow values or tokens defined in the theme.

Distribute Content

PropdistributeContent
TypeNodeLayoutDistributeStyle ('start' | 'center' | 'end' | 'around' | 'between' | 'even')
Defaultstart

The distribution of the children nodes within the container. Corresponds to the justify-content CSS Flexbox property.

Align Content

PropalignContent
TypeNodeLayoutAlignStyle ('start' | 'center' | 'end')
Defaultstart

The alignment of the children nodes within the container. Corresponds to the align-items CSS Flexbox property.

Wrap Content

PropwrapContent
TypeNodeLayoutWrapStyle ('wrap' | 'nowrap' | 'wrap-reverse')
Defaultnowrap

How the children nodes wrap within the container. Corresponds to the flex-wrap CSS Flexbox property.