Luke UI
ComponentsTypography

Text

Styled text with token-driven typography controls.

Text expects the Luke UI theme class at the app or root level. See Getting Started.

Use Text for styled text that should not create heading semantics.

<Text>The quick brown fox jumps over the lazy dog.</Text>

Best practices

GuidancePractices
DoUse fontSize tokens, such as 'h2', instead of arbitrary values so text stays consistent across the app.
Don'tUse Text for section headings. Use Heading, which manages semantic level automatically.

Typography

Text — Typography
Heading-like textAlert-like inline text

See the token reference below for valid color, fontFamily, fontSize, lineHeight, and fontWeight values.

Text transform and decoration

Text — Transform and decoration
Emphasized text

Truncation

Text — Truncation
Long content that should be line clamped to two lines.Long content truncated to one line.Untrimmed text spacing

Alignment and numeric glyphs

Text — Alignment and numeric glyphs
12121.21

Token reference

color tokens

neutralSubtle, neutralBold, neutralDisabled, neutralBoldInverted, positive, informative, caution, critical, inherit

fontFamily tokens

sans, mono

fontSize tokens

xxsmall, xsmall, small, standard, medium, large, xlarge, xxlarge, h1, h2, h3, h4, h5, h6

lineHeight tokens

nospace, tight, loose

fontWeight tokens

regular, medium, bold, inherit

textDecoration values

none, underline, line-through, inherit

textTransform values

none, capitalize, uppercase, lowercase, inherit

When to use vs Heading

Use Heading for actual section headings because it manages semantic level nesting automatically.

Use Text with a heading-sized fontSize token when content should look like a heading but is not semantically one, such as a large stat number.

Props

Prop

Type