Render custom text in your app
<Text>
component is used to render text in your app. It lets you easily display and customize your text content.
<Text>
component, you can just include it in your app and pass the text you want to display as a child of the component.
<h1>
tag.
These are the predefined styles available for the <Text>
component, along with their corresponding font size and line height:
Style | Settings |
---|---|
H1 | Font size 36px, Line height 48px |
H2 | Font size 26px, Line height 40px |
H3 | Font size 20px, Line height 32px |
H4 | Font size 16px, Line height 24px |
H5 | Font size 14px, Line height 20px |
H6 | Font size 12px, Line height 16px |
primary
, secondary
, destructive
, accent
, background
, foreground
, link
, inherit
.h1
, h2
, h3
, h4
, h5
, h6
.sans
, mono
.normal
, medium
, semibold
, bold
.normal
, wide
.left
, center
, right
.normal
, breakWord
, breakAll
.normal
, nowrap
, pre
, preLine
, preWrap
.