Skip to Content
DocumentationTypographyText

Text

A text element with comprehensive typography controls including size, color, weight, spacing, and text decorations.

Here is some text.

Colors

Normal textMuted textDisabled textColored text

Sizes

xssmbaselgxl2xl3xl4xl5xl6xl7xl8xl9xl

Weights

ThinExtralightLightNormalMediumSemiboldBoldExtraboldBlack

Alignment

Left
Center
Right

Letter spacing

The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.

Line height

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore.

Formatting

ItalicUnderlineStrikethrough

Decoration style

Customize the style of underline or strikethrough decorations.

Solid underlineDouble underlineDotted underlineDashed underlineWavy underline

Decoration color

Red underlineBlue underlineGreen underlineOrange strikethrough

Transform

CapitalizeUppercaseLowercase

Truncate

This is some really long text that should truncate.
This is some really long text that should truncate.
This is some really long text that should truncate.
This is some really long text that should truncate.

Whitespace

Control how whitespace is handled within text.

Multiple spaces collapse and text wraps normally.
This text will not wrap to the next line.
Preserves spaces and newlines.
Preserves spaces and wraps text.

Word break

Control how words break when reaching the end of a line.

Supercalifragilisticexpialidocious
Supercalifragilisticexpialidocious
Supercalifragilisticexpialidocious

Vertical align

Control vertical alignment of inline elements. Useful for superscript, subscript, and aligning text with icons.

E = mc2
H2O
aligned to top
aligned to middle
aligned to bottom

Text indent

Indent the first line of text.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Component props

NameTypeValues
colorFontColorSemanticColor | ColorName | TailwindColor
sizeResponsive<FontSize>"xs" | "sm" | "base" | "lg" | "xl" | ... | "9xl"
weightResponsive<FontWeight>"thin" | "light" | "normal" | "medium" | "semibold" | "bold" | ...
alignResponsive<TextAlign>"left" | "center" | "right"
spacingResponsive<LetterSpacing>"tighter" | "tight" | "normal" | "wide" | "wider" | "widest"
lineHeightResponsive<LineHeight>"none" | "tight" | "snug" | "normal" | "relaxed" | "loose" | "3"-"10"
wrapResponsive<TextWrap>"wrap" | "nowrap" | "balance" | "pretty"
whitespaceResponsive<Whitespace>"normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap" | "break-spaces"
wordBreakResponsive<WordBreak>"normal" | "words" | "all" | "keep"
transformResponsive<TextTransform>"capitalize" | "uppercase" | "lowercase" | "none"
indentResponsive<TextIndent>"0" | "px" | "0.5" | "1" | ... | "24"
verticalAlignResponsive<VerticalAlign>"baseline" | "top" | "middle" | "bottom" | "text-top" | "text-bottom" | "sub" | "super"
truncateResponsive<boolean>Truncate text with ellipsis
italicResponsive<boolean>Italic text style
underlineResponsive<boolean>Underline text decoration
strikethroughResponsive<boolean>Line-through text decoration
decorationStyleResponsive<TextDecorationStyle>"solid" | "double" | "dotted" | "dashed" | "wavy"
decorationColorFontColorSemanticColor | ColorName | TailwindColor
asTextElement"span" | "div" | "label" | "p" | "h1" | ... | "code" | "blockquote"
renderRenderPropRender prop for polymorphism