<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 is0
for unlimited.
text styles: checkout text styles
- support
color
style. - support
font-size
style.- iOS: default vlaue
32
- Android: platform specify
- HTML5: default value
32
- iOS: default vlaue
- support
font-style
style. - support
font-weight
style. - support
text-decoration
style. - support
text-align
style. - support
text-overflow
style. - support
line-height
0.6.1 style. - not support
flex-direction
,justify-content
,align-items
which 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
position
related styles - support
opacity
,background-color
etc.
Events
common events: check out the common events
- support
click
event. Check out common events - support
appear
/disappear
event. 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>