Skip to content

Text Elements

Elevate features three properties responsible for styling text elements: text, font, and format. Text is responsible for defining how text is presented and flows within a container, while font focuses on the characteristics of the typeface itself, and format is used to control the spacing between lines of text as well as other general formatting options.

text Property Modifiers

The following table describes the supported tokens and rules for the text property, along with the expected options and their output CSS.

ModifierExpected ValuesExample
colorColorToken (e.g., purple+1)text:purple+1
text-alignleft, center, right, justifytext:left
max-widthnote (20ch)
blob (35ch)
brief (45ch)
blog (65ch)
book (70ch)
essay (75ch)
full (80ch)
text:book
text-decorationnone, underline, overline, line-through, underline-overline, underline-line-through, overline-line-through, underline-overline-line-throughtext:underline
line-heightnone (1)
hug (1.2)
snug (1.3)
normal (1.4)
relaxed (1.5)
loose (1.6)
spacious (1.7)
extra-spacious (1.8)
text:spacious

font Property Modifiers

The following table describes the supported tokens and rules for the font property, along with the expected options and their output CSS.

ModifierExpected ValuesExample
font-sizetiny (0.533rem)
small (0.711rem)
base (1rem)
h6 (1.125rem)
h5 (1.5rem)
h4 (2.25rem)
h3 (3.375rem)
h2 (5.062rem)
h1 (7.594rem)
eyebrow (0.583rem)
font:small
font-familysans, serif, monofont:sans
font-weightthin (100)
extra-light (200)
light (300)
regular (400)
medium (500)
semibold (600)
bold (700)
extra-bold (800)
black (900)
font:bold
letter-spacingextra-tight (-0.02rem)
tight (-0.01rem)
normal (0)
wide (0.01rem)
wider (0.02rem)
widest (0.04rem)
font:widest

format Property Modifiers

The following table describes the supported tokens and rules for the format property, along with the expected options and their output CSS.

ModifierExpected ValuesExample
text-transformuppercase, lowercase, capitalizeformat:uppercase
hyphensnone,manual,autoformat:auto
white-spaceno-wrap,normal,pre-line,pre-wrap,pre,break-spacesformat:pre
word-breaknormal,all,keep,wordformat:word
overflow-wrapnormal,break-word,anywhereformat:anywhere


Additional Typography Utilities

These are direct properties (not part of text, font, or format):

PropertyExpected ValuesExample
font-stylenormal, italic, obliquefont-style:italic
font-variantnormal, small-caps, all-small-caps, petite-caps, all-petite-caps, unicase, titling-capsfont-variant:small-caps
font-stretchultra-condensed, extra-condensed, condensed, semi-condensed, normal, semi-expanded, expanded, extra-expanded, ultra-expandedfont-stretch:condensed
text-indentSpacingTokentext-indent:d3
text-overflowclip, ellipsistext-overflow:ellipsis
text-renderingauto, optimizeSpeed, optimizeLegibility, geometricPrecisiontext-rendering:optimizeLegibility
word-spacingSpacingTokenword-spacing:d1
tab-sizeNumericTokentab-size:4
writing-modehorizontal-tb, vertical-rl, vertical-lr, sideways-rl, sideways-lrwriting-mode:vertical-rl
directionltr, rtldirection:rtl
unicode-bidinormal, embed, bidi-override, isolate, isolate-override, plaintextunicode-bidi:isolate
line-clampNumericTokenline-clamp:3
text-decoration-colorColorTokentext-decoration-color:indigo+2
text-decoration-stylesolid, dashed, dotted, double, groove, ridge, inset, outset, none, hiddentext-decoration-style:dotted
text-decoration-thicknessSpacingTokentext-decoration-thickness:d1

Note: line-clamp currently only sets the property. You may still need the supporting layout rules (e.g., display:-webkit-box + -webkit-box-orient) depending on browser behavior.