Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

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.

TokenValueTailwindForSample
--ui-font-displayArchivo Expanded · Alexandriafont-displayHeadlines, ExtraBold.
--ui-fontIBM Plex Sans · IBM Plex Sans Arabicfont-sansBody and controls. The page default.
--ui-font-monoIBM Plex Mono · IBM Plex Sans Arabicfont-monoLabels, 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.

TokenValueTailwindForSample
--ui-head-3xl2.25–3.5rem / 1.1head-3xlLanding hero.
--ui-head-2xl2–2.75rem / 1.15head-2xlPage title.
--ui-head-xl1.625–2rem / 1.2head-xlBig section.
--ui-head-lg1.75rem / 1.25head-lgSection.
--ui-head-md1.5rem / 1.3head-mdSub-section.
--ui-head-sm1.25rem / 1.3head-smCard or dialog title.
--ui-head-xs1.125rem / 1.4head-xsGroup or list header.
--ui-head-2xs1rem / 1.4head-2xsSmallest headline.
--ui-body-lg1.25rem / 1.5body-lgLead paragraph.
--ui-body-md1rem / 1.5body-mdBody text and controls.
--ui-body-sm0.875rem / 1.5body-smHints and captions only.

Try the scale

The same line in English and Arabic, at every step.

body-md · 1rem / 1.5

body-md

Body text and controls.

Code nobody dares to touch

الكود اللي محدش بيجرؤ يلمسه

Angular
<h2 class="body-md">Code nobody dares to touch</h2>

Body weights

Tailwind's weights on a body style; heads stay ExtraBold.

Without TailwindValueTailwindForSample
ui-body-md400body-mdRegular: body text.
ui-body-md-m500body-md font-mediumMedium: labels in a form.
ui-body-md-s600body-md font-semiboldSemiBold: totals, a key figure.
ui-body-md-b700body-md font-boldBold: a word that must stand out.

Size tokens

Sizes alone, for inside a control where a style does not fit.

TokenValueTailwindForSample
--ui-text-3xl2.75remtext-3xlPage headline.
--ui-text-2xl2remtext-2xlSection headline.
--ui-text-xl1.5remtext-xlSub-section headline.
--ui-text-lg1.25remtext-lgLead paragraph, dialog title.
--ui-font-size1remtext-baseBody text and controls.
--ui-text-sm0.875remtext-smHints, captions, labels.
Angular
<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-sm is hints only.
  • Pick the class by look, the h1–h6 by the outline.
  • Arabic is never letter-spaced or set in italics.