Component Node

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

Components are composed from multiple nodes in the same way a Page is composed. To access Components in the Editor look for Component Nodes in the left panel or press 3.

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

Properties

Min Height

PropminHeight
Typestring
Defaultundefined

The minimum height of the component when instantiated.

Height

Propheight
Typestring
Default128px

The height of the component when instantiated.

Max Height

PropmaxHeight
Typestring
Defaultundefined

The maximum height of the component when instantiated.

Min Width

PropminWidth
Typestring
Defaultundefined

The minimum width of the component when instantiated.

Width

Propwidth
Typestring
Default320px

The width of the component when instantiated.

Max Width

PropmaxWidth
Typestring
Defaultundefined

The maximum width of the component when instantiated.

Background Color

PropbackgroundColor
Typestring
Defaultundefined

The background color of the component when instantiated.

Layout Style

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

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

Grid Columns

PropgridColumns
Typenumber
Default12

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

Grid Rows

PropgridRows
Typenumber
Default0

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

Grid Row Height

PropgridRowHeight
Typestring
Default16

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

Row Gap

PropgridRowGap
Typestring
Default4

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

Column Gap

PropgridColumnGap
Typestring
Default4

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

Distribute Content

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

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

Align Content

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

The alignment of the children nodes within the component. 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.

Padding

Proppadding
Typestring
Default0

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

Spacing

Propspacing
Typestring
Default8

The spacing to use between child nodes of the container.

Custom Styles

Propstyles
Typestring
Defaultelement.styles { }

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

Default Scope

Propscope
Typeunknown
Default{}

Additional data with which to populate the component. This data will be available as {{scope}} within the component.

Merge Default Scope

PropmergeDefaultScope
Typeboolean
Default{{true}}

Merge default component scope with the scope data from the instance