Template Node

Templates provide a way to reuse parts of your app (also known as composition).

Templates are composed from multiple nodes (components) in the same way a Page is composed. To access Templates in the Editor look for Template Nodes in the left panel or press 3.

Nodes such as instances and iterators are configured to use templates, and will "instantiate" the template at the location specified by the instance. Additional scope can be provided to the template using the scope property, which is available at {{scope.element}} within the template.

Properties

Min Height

ProptemplateNode.minHeight
Typestring
Default32px

The minimum height of the template when instantiated.

Height

ProptemplateNode.height
Typestring
Default32px

The height of the template when instantiated.

Max Height

ProptemplateNode.maxHeight
Typestring
Default960px

The maximum height of the template when instantiated.

Min Width

ProptemplateNode.minWidth
Typestring
Default32px

The minimum width of the template when instantiated.

Width

ProptemplateNode.width
Typestring
Default128px

The width of the template when instantiated.

Max Width

ProptemplateNode.maxWidth
Typestring
Default960px

The maximum width of the template when instantiated.

Background Color

ProptemplateNode.backgroundColor
Typestring
Defaultundefined

The background color of the template when instantiated.

Layout Style

ProptemplateNode.layoutStyle
TypeNodeLayoutStyle ('GRID' | 'HORIZONTAL_STACK' | 'VERTICAL_STACK')
DefaultVERTICAL_STACK

The layout style used by the template to arrange its children. Can be either a grid, horizontal stack, or vertical stack.

Grid Columns

ProptemplateNode.gridColumns
Typenumber
Default12

The number of columns in the container's grid system.

Grid Rows

ProptemplateNode.gridRows
Typenumber
Default0

The number of rows in the container's grid system, expanding to fill the container.

Grid Row Height

ProptemplateNode.gridRowHeight
Typestring
Default16

The height of each row within the container's grid system, in pixels.

Row Gap

ProptemplateNode.gridRowGap
Typestring
Default4

The space between each row within the container's grid system, in pixels.

Column Gap

ProptemplateNode.gridColumnGap
Typestring
Default4

The space between each column within the container's grid system, in pixels.

Distribute Content

ProptemplateNode.distributeContent
TypeNodeLayoutDistributeStyle ('start' | 'center' | 'end' | 'around' | 'between' | 'even')
Defaultstart

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

Align Content

ProptemplateNode.alignContent
TypeNodeLayoutAlignStyle ('start' | 'center' | 'end')
Defaultstart

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

Wrap Content

ProptemplateNode.wrapContent
TypeNodeLayoutWrapStyle ('wrap' | 'nowrap' | 'wrap-reverse')
Defaultnowrap

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

Padding

ProptemplateNode.padding
Typestring
Default0

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

Spacing

ProptemplateNode.spacing
Typestring
Default8

The spacing to use between child nodes of the container.

Custom Styles

ProptemplateNode.styles
Typestring
Defaultelement.styles { }

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