text
Text block.
Properties
text: string | number
The ability to pass data for display as a parameter instead of child elements.
style
Changing the appearance, position, and geometry of the block.
-
width
,maxWidth
,minWidth
Width of the block. Learn more. -
height
,maxHeight
,minHeight
Height of the block. Learn more. -
padding
,paddingHorizontal
,paddingVertical
,paddingTop
,paddingRight
,paddingBottom
,paddingLeft
Internal padding of the container. Learn more. -
margin
,marginHorizontal
,marginVertical
,marginTop
,marginRight
,marginBottom
,marginLeft
External margins of the block. Learn more. -
position
Positioning method of the block: relative or absolute. Learn more. -
top
,right
,bottom
,left
Offset from the original position. Learn more. -
color
Text color. Learn more. -
fontFamily
Name of the font family. Learn more. -
fontSize
Font size. Learn more. -
fontStyle
Ability to set the font to italic. Learn more. -
fontWeight
Font weight. Learn more. -
fontVariant
Ability to use monospaced digits. Learn more. -
letterSpacing
Letter spacing of the font. Learn more. -
lineClamp
Limiting the height of the text by the number of lines. Learn more. -
lineHeight
The amount of space allocated for one line of text in height. Learn more. -
textAlign
Principle of text alignment. Learn more. -
textAlignVertical
Vertical alignment of text within the container. Learn more. -
textDecorationLine
Adding underline or strikethrough to the text. Learn more. -
textOverflow
Method of truncating text when it overflows the container. Learn more. -
textShadowColor
Color of the text shadow. Learn more. -
textShadowOffset
Offset of the shadow horizontally and vertically. Learn more. -
textShadowRadius
Depth of shadow blur in pixels. Learn more. -
textTransform
Transformation of text upon display. Learn more. -
backgroundColor
Background color of the block. Learn more. -
opacity
Opacity of the entire block with its content. Learn more. -
elevation
Height of the shadow. Learn more. -
shadowColor
Color of the block's shadow. Learn more. -
flexBasis
Initial size of the block along the main axis of the container. Learn more. -
flexGrow
Growth factor of the block along the main axis of the container. Learn more. -
flexShrink
Shrinkage factor of the block along the main axis of the container. Learn more. -
flex
Defines the behavior of the block's size (growth, shrinkage, and initial size) along the main axis of the container. Learn more. -
alignSelf
Alignment of a specific block across the main axis of the container. Learn more. -
transform
Transformation of the geometry of blocks and containers in 2D and 3D space. Learn more.
Example
The <text>
block can act as a container for other <text>
blocks. In this case, child blocks that follow one another are collected into a line. Blocks are collected into a line without spaces between them. Spaces need to be specified explicitly.
Text styling.
Font sizes. Arbitrary and predefined.
Link class for convenient link formatting.
To set standard side margins, you can use the section class.