dark Summary web-appcustom-elementelement-attrelement-stateelement-flowglobal-stateimport-elementimport-scriptimport-styleis-visibleis-hiddenrepeat-list trigger-eventlisten-event set-attrset-stateset-timersend-eventhttp-requestrequest-headerrequest-bodyresponse-okresponse-failscripttrigger-element Comparison OperatorsMutation OperatorsData Source
Summary web-appcustom-elementelement-attrelement-stateelement-flowglobal-stateimport-elementimport-scriptimport-styleis-visibleis-hiddenrepeat-list trigger-eventlisten-event set-attrset-stateset-timersend-eventhttp-requestrequest-headerrequest-bodyresponse-okresponse-failscripttrigger-element Comparison OperatorsMutation OperatorsData Source

This element tag is used to define a custom element’s attributes, and only allowed to be used inside a <custom-element> tag. The default value can be set inside the tag.

To render the attribute’s value, use the <slot> tag with the attribute’s name as the slot’s name prefixed with @ symbol.

Custom Element's name Custom Element's type (see supported types below) You can put any string inside the tag, as long as it's not contains any HTML tags. Any integer or floating point number is allowed. Only `true` or `false` is allowed.

<custom-element name="my-element">
  <element-attr name="name" type="string">Default Value</element-attr>
  <template>
    My name is
    <slot name="@name"></slot>
  </template>
</custom-element>

<my-element name="R. Pracutian"></my-element>
Default Value