Tmplit Components

Args vs Context

  • Context - are values that are passed into the Tmplit. These are not equal to any attribute and are added to an array in the order they appear in the usage.
  • Arguments - are values that are passed into the Tmplit that are equal to the attribute name. These do not have an order.

Example

    {{tmplit '<tmplitName>' 'label' data-var-name='<var>'}}

Common Attributes

Attribute Description
tmplitName The first array context value and the DOM element that will be shown.
data-var-name The plc variable that will be data bound to the main function of the Tmplit
title The text that will show up in the DOM element. This is the second array item in context. There is no styling to this text.
label The text that will show up in the DOM element. This is the second array item in context. Some styles are supplied to this element.
attr HTML defined attributes that will be included in the main DOM element.
Info

Many of the Tmplit components are based on the Loupe UX components. The attributes on the Tmplit are passed to the underlying DOM element, and the attributes on the Loupe UX component are passed to the Loupe UX component.

Some compound Tmplits rename attributes because it needs to differentiate between inner and outer elements.

See the Loupe UX documentation for more information.

Overview