Typography
JSX style props for styling text
Use the fontFamily prop to set the font family of a text element.
<Text fontFamily="mono">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| fontFamily | font-family | fonts | 
Use the fontSize prop to set the font size of a text element.
// hardcoded values
<Text fontSize="12px">Hello World</Text>
<Text fontSize="10rem">Hello World</Text>
// token values
<Text fontSize="xs">Hello World</Text>
<Text fontSize="4xl">Hello World</Text>
<Text fontSize="5xl">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| fontSize | font-size | fonts | 
Use the textStyle prop to apply both a font size, line height, and letter
spacing composition at once.
<Text textStyle="xs">Hello World</Text>
<Text textStyle="sm">Hello World</Text>
<Text textStyle="md">Hello World</Text>
<Text textStyle="lg">Hello World</Text>
<Text textStyle="xl">Hello World</Text>
<Text textStyle="2xl">Hello World</Text>
<Text textStyle="3xl">Hello World</Text>
<Text textStyle="4xl">Hello World</Text>
<Text textStyle="5xl">Hello World</Text>| Prop | Config | 
|---|---|
| textStyle | theme.textStyles | 
Use the fontStyle prop to set the font style of a text element.
<Text fontStyle="italic">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| fontStyle | font-style | none | 
Use the fontWeight prop to set the font weight of a text element.
// hardcoded values
<Text fontWeight="600">Hello World</Text>
// token values
<Text fontWeight="semibold">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| fontWeight | font-weight | fontWeights | 
Use the fontVariantNumeric prop to set the font variant numeric of a text
element.
<Text fontVariantNumeric="lining-nums">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| fontVariantNumeric | font-variant-numeric | none | 
Use the letterSpacing prop to set the letter spacing of a text element.
// hardcoded values
<Text letterSpacing="0.1rem">Hello World</Text>
// token values
<Text letterSpacing="tight">Hello World</Text>
<Text letterSpacing="wide">Hello World</Text>
<Text letterSpacing="wider">Hello World</Text>
<Text letterSpacing="widest">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| letterSpacing | letter-spacing | letterSpacings | 
Use the truncate prop to truncate text.
<Text truncate>Lorem ipsum dolor sit amet...</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| truncate | text-overflow | none | 
Use the lineClamp prop to truncate multi-line text. Set lineClamp to none
to disable truncation.
<Text lineClamp="2">Lorem ipsum dolor sit amet...</Text>
// revert truncation
<Text lineClamp="none">Lorem ipsum dolor sit amet...</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| lineClamp | webkit-line-clamp | none | 
Use the lineHeight prop to set the line height of a text element.
// hardcoded values
<Text lineHeight="1.5">Hello World</Text>
// token values
<Text lineHeight="tall">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| lineHeight | line-height | lineHeights | 
Use the textAlign prop to set the text alignment of a text element.
<Text textAlign="left">Hello World</Text>
<Text textAlign="center">Hello World</Text>
<Text textAlign="right">Hello World</Text>
<Text textAlign="justify">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textAlign | text-align | none | 
Use the color prop to set the color of a text element.
<Text color="red">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| color | color | colors | 
Use the textDecoration or textDecor prop to set the text decoration of a
text element.
<Text textDecoration="underline">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textDecor,textDecoration | text-decoration | none | 
Use the textDecorationColor prop to set the text decoration color of a text
element.
<Text textDecoration="underline" textDecorationColor="red">
  Hello World
</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textDecorationColor | text-decoration-color | colors | 
Use the textDecorationStyle prop to set the text decoration style of a text
element.
<Text textDecoration="underline" textDecorationStyle="dashed">
  Hello World
</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textDecorationStyle | text-decoration-style | none | 
Use the textDecorationThickness prop to set the text decoration thickness of a
text element.
<Text textDecoration="underline" textDecorationThickness="1px">
  Hello World
</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textDecorationThickness | text-decoration-thickness | none | 
Use the textUnderlineOffset prop to set the text underline offset of a text
element.
<Text textDecoration="underline" textUnderlineOffset="1px">
  Hello World
</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textUnderlineOffset | text-underline-offset | none | 
Use the textTransform prop to set the text transform of a text element.
<Text textTransform="uppercase">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textTransform | text-transform | none | 
Use the textOverflow prop to set the text overflow of a text element.
<Text textOverflow="ellipsis">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textOverflow | text-overflow | none | 
Use the textShadow prop to set the text shadow of a text element.
<Text textShadow="0 0 1px red">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textShadow | text-shadow | shadows | 
Use the textIndent prop to set the text indent of a text element.
// hardcoded values
<Text textIndent="1rem">Hello World</Text>
// token values
<Text textIndent="3">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| textIndent | text-indent | spacing | 
Use the verticalAlign prop to set the vertical alignment of a text element.
<Text verticalAlign="top">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| verticalAlign | vertical-align | none | 
Use the whiteSpace prop to set the white space of a text element.
<Text whiteSpace="nowrap">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| whiteSpace | white-space | none | 
Use the wordBreak prop to set whether line breaks appear wherever the text
would otherwise overflow its content box.
<Text wordBreak="break-all">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| wordBreak | word-break | none | 
Use the hyphens prop to set whether hyphens are used in the text.
<Text hyphens="auto">Hello World</Text>| Prop | CSS Property | Token Category | 
|---|---|---|
| hyphens | hyphens | none |