Chapter 02 Foundations
Typography
Five free faces, shipped in the package. Every stack is Latin then Arabic.
Families
Headlines, body and labels each have one stack.
| Token | Value | Tailwind | For | Sample |
|---|---|---|---|---|
--ui-font-display | Archivo Expanded · Alexandria | font-display | Headlines, ExtraBold. | |
--ui-font | IBM Plex Sans · IBM Plex Sans Arabic | font-sans | Body and controls. The page default. | |
--ui-font-mono | IBM Plex Mono · IBM Plex Sans Arabic | font-mono | Labels, upper case: class ui-label. |
Type styles
One class sets face, weight, size and line height, and takes variants: head-lg md:head-2xl. Without Tailwind, add ui-: ui-head-lg.
| Token | Value | Tailwind | For | Sample |
|---|---|---|---|---|
--ui-head-3xl | 2.25–3.5rem / 1.1 | head-3xl | Landing hero. | |
--ui-head-2xl | 2–2.75rem / 1.15 | head-2xl | Page title. | |
--ui-head-xl | 1.625–2rem / 1.2 | head-xl | Big section. | |
--ui-head-lg | 1.75rem / 1.25 | head-lg | Section. | |
--ui-head-md | 1.5rem / 1.3 | head-md | Sub-section. | |
--ui-head-sm | 1.25rem / 1.3 | head-sm | Card or dialog title. | |
--ui-head-xs | 1.125rem / 1.4 | head-xs | Group or list header. | |
--ui-head-2xs | 1rem / 1.4 | head-2xs | Smallest headline. | |
--ui-body-lg | 1.25rem / 1.5 | body-lg | Lead paragraph. | |
--ui-body-md | 1rem / 1.5 | body-md | Body text and controls. | |
--ui-body-sm | 0.875rem / 1.5 | body-sm | Hints and captions only. |
Try the scale
The same line in English and Arabic, at every step.
body-md
Body text and controls.
Code nobody dares to touch
الكود اللي محدش بيجرؤ يلمسه
<h2 class="body-md">Code nobody dares to touch</h2>Body weights
Tailwind's weights on a body style; heads stay ExtraBold.
| Without Tailwind | Value | Tailwind | For | Sample |
|---|---|---|---|---|
ui-body-md | 400 | body-md | Regular: body text. | |
ui-body-md-m | 500 | body-md font-medium | Medium: labels in a form. | |
ui-body-md-s | 600 | body-md font-semibold | SemiBold: totals, a key figure. | |
ui-body-md-b | 700 | body-md font-bold | Bold: a word that must stand out. |
Size tokens
Sizes alone, for inside a control where a style does not fit.
| Token | Value | Tailwind | For | Sample |
|---|---|---|---|---|
--ui-text-3xl | 2.75rem | text-3xl | Page headline. | |
--ui-text-2xl | 2rem | text-2xl | Section headline. | |
--ui-text-xl | 1.5rem | text-xl | Sub-section headline. | |
--ui-text-lg | 1.25rem | text-lg | Lead paragraph, dialog title. | |
--ui-font-size | 1rem | text-base | Body text and controls. | |
--ui-text-sm | 0.875rem | text-sm | Hints, captions, labels. |
<article class="ui-card">
<h3 class="head-sm">March</h3>
<p class="body-md font-semibold">3 orders · 1,240 EGP</p>
<p class="body-sm text-text-muted">Refunds show after 5 working days.</p>
</article>Rules
- Body text never under 1rem;
body-smis hints only. - Pick the class by look, the h1–h6 by the outline.
- Arabic is never letter-spaced or set in italics.