Add a data attribute to an UIComponent with
<tc:dataAttribute/>
.
The data attribute is added to the parent and can be used by scripts.
Each box contains a panel with a data attribute. It contains a color code which will be used by a JavaScript which is included into this page. Click in the content area of the boxes to set up a color. Doubleclick to remove it.
<tc:box label="Green">
<tc:panel>
<tc:style customClass="demo-data-attribute"/>
<tc:dataAttribute name="color" value="#00ff00"/>
...