The syntax of the component template is the same as that of the page template. The node tree generated by combining the component template and component data is rendered at the reference position.
In the component template, the <slot> tag is used to pass the child node content.
The sample code snippet is as follows:
<!--Component HXML-->
<view class="custom">
<view>Internal node of the component</view>
<slot></slot>
</view>
<!--Page HXML-->
<view>
<my-component>
<!-- Content in the position of the <slot> tag -->
<view>Content inserted into the <slot> tag</view>
</my-component>
</view>