Reference
Nodes
Components
Component

Component Component

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 (opens in a new tab) is composed. To access Components in the Editor look for Component Nodes in the left panel or press 3.

Nodes such as instances (opens in a new tab) and iterators (opens in a new tab) 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.

Border Radius

PropborderRadius
Typestring
Defaultundefined

The border radius 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
Default16

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

Grid Row Height

PropgridRowHeight
Typestring
Default0

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

Row Gap

PropgridRowGap
Typestring
Default4px

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

Column Gap

PropgridColumnGap
Typestring
Default4px

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.

Overflow

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

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')
Defaulthidden

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')
Defaulthidden

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

Spacing

Propspacing
Typestring
Default8px

The spacing to use between child nodes of the 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.

Properties

Propprops
Typearray
Default[]

Variables to be used by the component. Instances of this component can provide these values to change the render

Component Property

Propprops[]
Typeobject
Defaultundefined

An input to the component. The component can read this value from $props by its "key"

Prop ID

Propprops[].id
Typestring
Defaultundefined

A unique ID for the component property

Key

Propprops[].key
Typestring
Defaultundefined

The key on $props which is exposes this value

Display Name

Propprops[].displayName
Typestring
Defaultundefined

The label shown with the input on instances

Description

Propprops[].description
Typestring
Defaultundefined

An optional description of the property

Placeholder

Propprops[].placeholder
Typestring
Defaultundefined

The placeholder shown with the input on instances

Type

Propprops[].propType
TypePropType ('action' | 'array' | 'boolean' | 'closure' | 'color' | 'component_props' | 'component_reference' | 'config' | 'current_profile' | 'derived' | 'dynamic' | 'enum' | 'events' | 'expression' | 'function' | 'json' | 'icon' | 'length' | 'number' | 'object' | 'ordered_array' | 'profiles' | 'store' | 'string' | 'unknown' | 'abstract')
Defaultundefined

The data type of the property value

Default Value

Propprops[].defaultValue
Typeunknown
Defaultundefined

What value should be used when this property is not provided

Test Value

Propprops[].testValue
Typeunknown
Defaultundefined

The value shown in the component editor if a value or default value are not provided. It does not get copied to instances.