• Reference
  • Nodes
  • Components
  • Instance

Instance Component

Instances, when used in conjunction with components, provide a lightweight way to reuse parts of your app (also known as composition).

Instances are attached to a component, and will "instantiate" or "expand" 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

Visible

PropisVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

PropisEnabled
Typeboolean
Default{{true}}

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
Default320px

The width of the component when instantiated.

Min Width

PropminWidth
Typestring
Defaultundefined

The minimum width of the component when instantiated.

Max Width

PropmaxWidth
Typestring
Defaultundefined

The maximum width of the component when instantiated.

Height

Propheight
Typestring
Default128px

The height of the component when instantiated.

Min Height

PropminHeight
Typestring
Defaultundefined

The minimum height of the component when instantiated.

Max Height

PropmaxHeight
Typestring
Defaultundefined

The maximum height of the component when instantiated.

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
Defaultelement.styles { }

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.

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
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.

Index

Prop$index
Typenumber
Default0

This instance's index when rendered in an iterator. Available as {{$index}} within the component.

Props

Prop$props
Typeunknown
Defaultundefined

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

Last updated on November 29, 2022