TrademarkTrademark
Docs
Ctrl k
Search docs...
Components

Text

Updated: June 30, 2026
View on GitHub

The Text component provides consistent typography throughout your UI, with support for variants, color tokens, alignment, and spacing. It is typically used for body content, labels, descriptions, and captions.

Variants

Use variant to apply a named combination of type, weight, and size.

Font family

You can override the default font-family that comes with the variant with the family prop.

Font weight

You can override the default font-weight inside a variant with the weight prop.

Colors

Text color can be set using onBackground or onSolid.

Opacity

Control text visibility with the opacity prop, accepting values from 0 to 100.

Alignment

Set horizontal alignment with the align prop.

Wrapping

Control how the text wraps using the wrap prop.

Spacing

Use margin and padding props to control layout spacing.

Semantic HTML

Control the rendered tag using the as prop.

API reference

Type
Default
as
ElementType"span"
variant
TextVariant—
size
xssmlxl
—
weight
defaultstrong
—
family
displayheadingbodylabelcode
—
onBackground
`${ColorScheme}-${ColorWeight}`—
onSolid
`${ColorScheme}-${ColorWeight}`—
opacity
Opacity100
align
leftcenterrightjustify
—
wrap
normalnowrapbalance
—
truncate
boolean—
padding
SpacingTokennumber
—
paddingX
SpacingTokennumber
—
paddingY
SpacingTokennumber
—
paddingLeft
SpacingTokennumber
—
paddingRight
SpacingTokennumber
—
paddingTop
SpacingTokennumber
—
paddingBottom
SpacingTokennumber
—
margin
SpacingTokennumber
—
marginX
SpacingTokennumber
—
marginY
SpacingTokennumber
—
marginLeft
SpacingTokennumber
—
marginRight
SpacingTokennumber
—
marginTop
SpacingTokennumber
—
marginBottom
SpacingTokennumber
—
children
React.ReactNode—
className
string—
style
React.CSSProperties—
…and every React.HTMLAttributes propinherited—
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club