Arabic RTL web design
Arabic is not English flipped. A good Arabic page reads from the right, uses a real Arabic typeface with room to breathe, keeps English words and numbers in the right order, and mirrors only what has a direction.
Follow the steps in order. Load a reference file only when the task needs it.
1. Set the direction once, at the root
- Arabic page:
<html lang="ar" dir="rtl">. Bilingual page: the root gets the main language, and each block in the other language gets its ownlanganddir. - Never fake RTL with
direction: rtlin CSS alone,flex-direction: row-reverse/flex-row-reverse,transform: scaleX(-1)on layouts, or by swappingleft/rightby hand. Flexbox, grid and inline text already followdir.
2. Write layout CSS with logical properties
Use margin-inline-start/end, padding-inline, inset-inline-start/end, border-inline-start, text-align: start/end, border-start-start-radius, and so on. Physical left/right only for things that must not mirror (a play icon, a chart axis). One stylesheet then works in both directions.
Details, Tailwind (ms-*, pe-*, start-*, rtl: variants) and the mapping table: references/css.md.
3. Typography
- Pick a real Arabic typeface that fits the brand, plus a Latin face with a similar weight and x-height for English words. Shortlist and pairings: references/fonts.md.
- No
letter-spacingon Arabic text, ever: it breaks the joins between letters. Remove tracking from Arabic headings, buttons and labels (keep it only on Latin-only elements). text-transform: uppercaseand small caps do nothing in Arabic. Build hierarchy with size and weight, never with caps. Avoid italic; use weight or colour for emphasis.- Body
line-height1.6 to 1.9, headings about 1.25 to 1.4. Arabic often needs 5 to 15 percent more font size than Latin to read at the same weight: scale the text (:root:lang(ar) body { font-size: 1.0625rem; }), not the roothtmlsize, which would also stretch every rem-based width and gap. - Line length 45 to 75 characters.
text-wrap: balanceon headings,prettyon paragraphs.
4. Mixed Arabic and English (bidi)
Inside Arabic text, wrap in <bdi> (words) or <span dir="ltr"> (numbers and codes):
- English words and brand names: "Claude"، "Invisalign"، "Google Maps"
- Anything with symbols between numbers or several parts: hyphen ranges ("$500 - $1,000"), prices with a symbol ("$500"), phone numbers, emails, URLs, versions, code
No wrapper needed for a plain number ("6 شهور"، "500 جنيه"), a percentage ("خصم 10%") or a range written with Arabic words ("من 15,000 لـ 40,000 ريال"). Do keep any range or price on one line (
white-space: nowrap/whitespace-nowrap) so it never breaks in the middle. Attributes (placeholder,title,alt,aria-label) and<option>cannot hold wrappers: put English at the start or end of the string, or rephrase in Arabic. Use the Arabic comma (،), question mark (؟) and quote marks (« ») in Arabic sentences. Patterns for React/Next.js and CMS content: references/css.md. Bilingual pages, language toggles and carousels: references/bilingual.md.
5. Icons and images
Mirror icons that point along the reading direction: back/next arrows, chevrons, breadcrumbs, "send", progress and sliders, undo/redo, list arrows. Mirror the motion too: a hover that nudges an arrow with translate-x-1 must move the other way in RTL (rtl:-translate-x-1). Do not mirror: logos, play/pause, clocks, checkmarks, search, media, brand marks, charts with numeric axes, or photos. Full list and code: references/icons-numbers-forms.md.
6. Numbers, dates, forms
- Choose Western digits (123) or Arabic-Indic digits (١٢٣) once and use them everywhere; most modern Arabic product sites use Western digits.
- Format with
Intl.NumberFormatandIntl.DateTimeFormat('ar-EG','ar-SA','ar-AE'...), withnumberingSystem: 'latn'if you chose Western digits. - Form labels and errors in Arabic, aligned to the start. Email, URL, phone, card and code fields are
dir="ltr", right-aligned only in RTL so they line up with the Arabic fields: CSS[dir="rtl"] input[dir="ltr"] { text-align: right; }, Tailwindrtl:text-right. Date inputs follow the pagedir; check the picker opens correctly on mobile. Examples: references/icons-numbers-forms.md.
7. Copy
Write native Arabic for the market (Egyptian, Gulf, Levantine or Modern Standard), never a word-for-word translation of English. Keep product and tech names the audience says in English (Claude, Webflow, SEO) in English, isolated as in step 4. CTAs start with a verb ("احجز موعدك"، "ابدأ دلوقتي").
8. Platform specifics
Webflow, Framer, Next.js, Tailwind and email: references/platforms.md.
9. Check before saying it is done
Run the audit script that ships with this skill on the built HTML/CSS/JSX (it flags physical left/right, letter-spacing and uppercase on Arabic, missing lang/dir, unisolated English and numbers, unmirrored arrows):
python3 <this skill's folder>/scripts/rtl_audit.py path/to/page.html [more files or folders]
Fix every error, almost every warn, and look at each info. Add --strict to fail on warnings in CI, and <!-- rtl-audit-ignore --> or /* rtl-audit-ignore */ on a line that is intentionally physical (a nudged play icon). Then look at the page at 375, 768 and 1440 px wide:
-
langanddirright on the root and on every other-language block - Layout mirrors correctly; nothing overlaps; no horizontal scroll
- Arabic font loaded in the weights used; no tracking or caps on Arabic
- English words, prices, phones and emails in the right order; punctuation in place
- Directional icons mirrored, the rest untouched
- LTR form fields for email, phone, URL; Arabic labels and errors
- Bilingual: both languages checked; the toggle switches
lang/dir, title, placeholders, aria-labels
The audit reads files line by line: it cannot see inline SVG arrows, copy inside JS translation objects, or computed styles, so the visual check is not optional.