Text
Size, weight, alignment, wrapping and the rest of how text looks. Moey's base size is 15px — compact, made for apps.
Font size
<p class="text-sm">…</p>
<h1 class="text-3xl md:text-5xl">…</h1>
Each size comes with a matching line height — bigger text gets tighter lines. Works with breakpoints: text-3xl md:text-5xl.
Font weight
<div class="flex flex-wrap gap-4 text-lg">
<span class="font-light">font-light</span>
<span class="font-normal">font-normal</span>
<span class="font-medium">font-medium</span>
<span class="font-semibold">font-semibold</span>
<span class="font-bold">font-bold</span>
<span class="font-extrabold">font-extrabold</span>
</div>
Font family & style
<div class="space-y-2">
<div class="font-sans">font-sans — Inter</div>
<div class="font-mono">font-mono — JetBrains Mono</div>
<div class="italic">italic</div>
<div class="tabular-nums">tabular-nums: 1,111.11 · 8,888.88</div>
</div>
Line height & letter spacing
leading-tight — Long lines of text need room to breathe, but headings and labels look better close together.
leading-relaxed — Long lines of text need room to breathe, but headings and labels look better close together.
<div class="grid md:grid-cols-2 gap-4">
<p class="leading-tight m-0">leading-tight — Long lines of text need room to breathe, but headings and labels look better close together.</p>
<p class="leading-relaxed m-0">leading-relaxed — Long lines of text need room to breathe, but headings and labels look better close together.</p>
</div>
<div class="flex flex-wrap gap-6 mt-4">
<span class="tracking-tight">tracking-tight</span>
<span class="tracking-wide uppercase text-xs font-semibold">tracking-wide</span>
<span class="tracking-widest uppercase text-xs font-semibold">tracking-widest</span>
</div>
Text alignment
<div class="space-y-2">
<div class="text-start">text-start</div>
<div class="text-center">text-center</div>
<div class="text-end">text-end</div>
<div class="text-center md:text-start">text-center md:text-start</div>
</div>
Decoration & transform
<div class="flex flex-wrap gap-4">
<span class="underline">underline</span>
<span class="line-through">line-through</span>
<a href="#text-decoration" class="no-underline">no-underline link</a>
<span class="uppercase">uppercase</span>
<span class="capitalize">capitalize these words</span>
</div>
Wrapping
text-balance spreads a heading evenly over its lines
<div class="space-y-3 max-w-sm">
<div class="text-truncate text-start">text-truncate: one line that cuts off with an ellipsis when it gets too long</div>
<div class="line-clamp-2 text-start">line-clamp-2: up to two lines, then an ellipsis. Great for card descriptions and previews of messages that might be very long indeed.</div>
<h4 class="text-balance m-0">text-balance spreads a heading evenly over its lines</h4>
<div class="break-words text-start">break-words: https://nakedtuxedo.com/a/very/long/link/that/would/otherwise/push/the/page/sideways</div>
</div>
Vertical align
<div class="text-2xl">
Moey
<span class="align-middle text-sm inline-block">align-middle</span>
<span class="align-top text-sm inline-block">align-top</span>
</div>
Links
<div class="flex flex-wrap gap-6">
<a href="#link">Default link</a>
<a href="#link" class="link-plain">link-plain</a>
<a href="#link" class="link-muted">link-muted</a>
<a href="#link" class="link-reset">link-reset</a>
</div>
link-plain underlines only on hover, link-muted is a quiet color, link-reset looks like the text around it — for whole cards and list rows that are links.
The large sizes
<div class="space-y-2 overflow-hidden">
<div class="text-5xl font-bold tracking-tight">text-5xl</div>
<div class="text-6xl font-bold tracking-tight">text-6xl</div>
</div>
Every line height
leading-none — two lines of text show how close together the lines sit.
leading-tight — two lines of text show how close together the lines sit.
leading-snug — two lines of text show how close together the lines sit.
leading-normal — two lines of text show how close together the lines sit.
leading-relaxed — two lines of text show how close together the lines sit.
leading-loose — two lines of text show how close together the lines sit.
<div class="grid md:grid-cols-3 gap-4 text-sm">
<p class="leading-none bg-1 rounded p-2 m-0"><b>leading-none</b> — two lines of text show how close together the lines sit.</p>
<p class="leading-tight bg-1 rounded p-2 m-0"><b>leading-tight</b> — two lines of text show how close together the lines sit.</p>
<p class="leading-snug bg-1 rounded p-2 m-0"><b>leading-snug</b> — two lines of text show how close together the lines sit.</p>
<p class="leading-normal bg-1 rounded p-2 m-0"><b>leading-normal</b> — two lines of text show how close together the lines sit.</p>
<p class="leading-relaxed bg-1 rounded p-2 m-0"><b>leading-relaxed</b> — two lines of text show how close together the lines sit.</p>
<p class="leading-loose bg-1 rounded p-2 m-0"><b>leading-loose</b> — two lines of text show how close together the lines sit.</p>
</div>
Case & breaking
text-pretty avoids a single short word left alone on the last line of a paragraph.
line-clamp-1: one line only, then an ellipsis for everything that does not fit.
<div class="space-y-2 max-w-64">
<div class="lowercase">LOWERCASE turns into lowercase</div>
<div class="uppercase normal-case">normal-case undoes uppercase</div>
<div class="text-nowrap overflow-hidden text-start">text-nowrap keeps everything on one line however long</div>
<div class="break-all text-start">break-all: Supercalifragilisticexpialidocious</div>
<p class="text-pretty m-0">text-pretty avoids a single short word left alone on the last line of a paragraph.</p>
<p class="line-clamp-1 m-0">line-clamp-1: one line only, then an ellipsis for everything that does not fit.</p>
</div>
| Class | Does |
|---|---|
text-xs · text-sm · text-base · text-lg · text-xl · text-2xl · text-3xl · text-4xl · text-5xl · text-6xl | font size + line height · with breakpoints |
font-light · font-normal · font-medium · font-semibold · font-bold · font-extrabold | weight · with breakpoints |
font-sans · font-mono · italic · not-italic · tabular-nums | family, style, numbers |
leading-none · leading-tight · leading-snug · leading-normal · leading-relaxed · leading-loose | line height · with breakpoints |
tracking-tighter · tracking-tight · tracking-normal · tracking-wide · tracking-wider · tracking-widest | letter spacing |
text-start · text-center · text-end · text-justify | alignment · with breakpoints |
underline · line-through · no-underline · uppercase · lowercase · capitalize · normal-case | decoration and case |
text-truncate · line-clamp-1 · … · line-clamp-6 · text-balance · text-pretty · text-nowrap · break-words · break-all | wrapping |
align-baseline · align-top · align-middle · align-bottom · align-text-top · align-text-bottom | vertical-align (inline things) |
link-plain · link-muted · link-reset | links |
| Colors | see Colors: text-muted · text-green · text-blue-600 |