Skip to main content

Text

Text is a typography component for rendering text content with various styling options, including gradient text support.

Usage

<Text 
color="primary"
textVariant="body1"
>
Regular text content
</Text>

With Gradient

<Text 
gradient={{
angle: "45deg",
fromColor: "primary",
toColor: "secondary",
fromStop: "0%",
toStop: "100%"
}}
>
Gradient text
</Text>

Line Clamping

<Text lines={2}>
This text will be clamped to 2 lines with an ellipsis if it overflows...
</Text>

Props

Text accepts all styled-system props from the following categories:

Additional Props

PropTypeDescription
gradientobjectGradient configuration for text
linesnumberNumber of lines before text truncation
textTransformstringCSS text-transform property
textVariantstringTheme text variant name