<text>
0.4 cn
Summary
Render text with specified style rule, <text> tag can contain text value only. You can use variable interpolation in the text content with the mark {{}}.
Child Components
This component supports no child components but a text content.
Attributes
value: <string> text value of this component. This is equal to the content of<text>.
Other attributes please check out the common attributes.
Styles
lines: specify the text lines. Default value is0for unlimited.
text styles: checkout text styles
- support
colorstyle. - support
font-sizestyle.- iOS: default vlaue
32- Android: platform specify
- HTML5: default value
32
- iOS: default vlaue
- support
font-stylestyle. - support
font-weightstyle. - support
text-decorationstyle. - support
text-alignstyle. - support
text-overflowstyle. - support
line-height0.6.1 style. - not support
flex-direction,justify-content,align-itemswhich is active for child nodes, and text has no child nodes.
common styles: check out common styles for components
- support flexbox related styles
- support box model related styles
- support
positionrelated styles - support
opacity,background-coloretc.
Events
common events: check out the common events
- support
clickevent. Check out common events - support
appear/disappearevent. Check out common events
Example
<div>
<text>...</text>
<text value="..."></text>
<text style="font-size: 24; text-decoration: underline;">{{price}}</text>
<text value="{{...}}"></text>
</div>